I have created a new vRO Workflow, which I want to place in the Catalog for users to launch.
A custom form field of the workflow needs some metadata to work, similar to how event-triggered workflows can use the inputProperties to extract information.
With a event-triggered workflow, I could just create an "inputProperties" variable of type Properties and parse it. What would be the way to achieve this with a custom form?
Creating an "inputProperties" input in the vRO workflow does not work, the field is not filled with content (nothing is passed by vRA to vRO), I guess this is because inputProperties are only generated with a subscription? I have tried creating a new input of type Properties, and used "external value" to bind it with a vRO action, which taken "inputProperties" as an input, but nothing is passed on here; similar, if the field in the custom form in bound to an action, that extracts metadata System.getContext().getParameter("__metadata_someparameter"), I get a null value error.
For reference, in vRA 7, I could just create a "__asd_subtenantRef" or "_asd_requestedBy" input property in the workflow and those values would be automatically filled with relevant metadata in the custom form.
Edit:
For better understanding, here's what I want to achieve:
You can bind some metadata fields as inputs:
Project is for "subtenantRef". The others quite self-explanatory.
You can bind some metadata fields as inputs:
Project is for "subtenantRef". The others quite self-explanatory.
Thanks for pointing me in the right direction, I forgot about the bindings.
The data provided here is however very scarce, I wonder if really only those few values are passed to the form, or if there is an object with more useful metadata. The "Requested By" binding only delivers the username without the domain name, which is surprising for a product that can be bound to a multi-domain environment.
The vRO Workflow Custom Form in a catalog provides a few more fields: __username and __userdisplayname, the values are the same though and both reference the service account used to launch the workflow and not the user that requests the service:
I do not know what to make of "props". I wanted to pass "props" as an object to vRO, but a field where you fill the value by "external source" does not allow binding with any values from "Request info fields". You can bind "Key" or "Value" to a single input field of type "string", but not both "Key" and "Value" to columns of a Data Grid element.
Overall, compared to vRA7, this is pretty disappointing. I don't understand why vmware has taken a step back here and does provide such a limited amount of request metadata information in the input form.
edit: sadly the list of request info properties will not be expanded with 8.9: Using and Managing vRealize Automation Service Broker - vRealize Automation 8.9 (vmware.com)
I had to rip out configured Directories in vIDM and re-add them usinf UserPrincipalName instead of samaccountname and now all users are correctly identified by their upn (Requested By = upn), which makes life much easier.
Hi,
I have similar requirement for a XaaS catalog to pass __metadata_userName and __metadata_requestId as input parameters similar to __asd_requestedBy and __asd_catalogRequestId in vRA 7.x.
I see requestedBy can be used through Bindings for Username. May I know which one to select for __metadata_requestId ?
Regards,
Sasidhar
You do not have requestId on the request form yet. You can get in in your workflow later:
System.getContext().getParameter('__metadata_requestId');
Am getting NULL values for the Metadata while workflow execution, however, the event is triggered and I could see the values navigating to Subscriptions --> Workflow Runs.
It's failing because InputProperties was missing, not because context was incomplete. Do you run this workflow as EBS?
Also, you are trying to set input variables in your workflow: you should remove them as inputs.
Am using EBS for passing the inputProperties,using the condition
event.data.blueprintId == 'XXXX35fa-13c9-3c5d-bc3XXXXXXXXXX'
The blueprintId value is XaaS CatalogId.
Please note, this is for a XaaS catalog which am trying to capture Metadata as inputs
I have removed them as input variables, still getting the same error
TypeError: Cannot read property "customProperties" from null (Workflow:Request FPT Storage Wrapper / Get MetaData (item3)#10200)
I am still confused what you are doing here. You say you have an XaaS but you created an EBS for Compute Allocation? XaaS workflows do not trigger this event.
I am trying to pass Metadata as input parameters to my XaaS workflow using a wrapper workflow.
I used to pass XaaS payload( __asd_catalogRequestId and __asd_requestedBy) as input parameters in vRA 7.x. As part of migrating it vRA 8.x, one option is to bind the values(Request ID is not available) in Custom form, other option is to trigger an event and extract metadata ( __metadata_userName and __metadata_requestId) from the properties and pass it as input parameters. Please correct me if am wrong.
Tried the XaaS event, still same issue. Please help me with full steps on how I can use Metadata as input parameters in vRA 8.x for XaaS catalog.
You cannot use inputProperties and CustomProperties with XaaS. However, if you want to grab the username and request ID in a wrapper workflow, here is what you could do:
userName and requestId are local variables of the wrapper workflow.
These then passed to the subflow as input (input1 is the input of the wrapper wf):
Here are the logs:
HTH
It worked like a charm..thanks a lot for your help 🙂
I am struggling with the same issue. I have tried the scriptable task with output of "userName" with no luck. I have also tried to just call it in the script that we are setting all necessary fields for our Rest API call.
We get the username output from getContext().getParameter("__metadata_userName") without any additional scripting. PFA screenshot.
looks like a "_" is missing before _metadata. it should be "_ _metadata_userName" without the space