Get vRO Request Variables

Mindwatering Incorporated

Author: Tripp W Black

Created: 10/01/2020 at 05:10 PM

 

Category:
VMWare
vRO - VCAC

Task:
Retrieve the __asd variables of the current workflow running request for a workflow attribute or temporary variable.
e.g. __asd_requestedBy


Solution:
var catReqBy = System.getContext().getParameter("__asd_requestedBy");
var catReqFor = System.getContext().getParameter("__asd_requestedFor");
var catReqID = System.getContext().getParameter("__asd_catalogRequestId");

// get the catalog request item via the catalog request ID - via vCACHost
var catItemReq = vCACCAFEEntitiesFinder.getResourceActionRequest(vCACHost, catReqID);

// get the request number via the catalog item request
if (!catItemReq) {
System.warn('Failed to get Catalog Item Request');
} else {
var catItemReqNum = catItemReq.requestNumber;
}









previous page