If you want to call a vCenter Orchestrator workflow asynchronously and then retrieve the results of the completed workflow at a later point, you can use the WaitForVcoWorkflowCompletion activity.

The WaitForVcoWorkflowCompletion activity blocks execution of the IaaS workflow until the vCenter Orchestrator workflow has completed or a timeout is reached. The activity returns the results of the vCenter Orchestrator workflow if it completes successfully, an error if the workflow fails, or null if the workflow times out.

Call a vCenter Orchestrator Workflow using the InvokeVcoWorkflowAsync activity.

1

In vCloud Automation Center Designer, open a workflow where you have used the InvokeVcoWorkflowAsync activity.

2

Navigate to the context where you want to retrieve the results of the vCenter Orchestrator workflow.

3

Drag the WaitForVcoWorkflowCompletion activity into the Designer pane.

4

In the Properties pane, specify the name of the variable representing the virtual machine ID in VirtualMachineId.

The customizable workflows contain a variable by default named virtualMachineId that is set during initialization.

5

Create a variable of type DynamicOps.VcoModel.Common.VcoWorkflowExecutionToken.

6

Create a variable of type DynamicOps.VcoModel.Common.VcoWorkflowExecutionToken.

7

Specify the name of the token variable as the executionToken output parameter on the InvokeVcoWorkflowAsync activity.

8

Specify the same variable name as the WorkflowExecutionToken property of the WaitForVcoWorkflowCompletion activity.

9

Retrieve the output of the vCenter Orchestrator workflow.

a

Create a variable of type DynamicOps.VcoModel.Common.VcoWorkflowExecutionResult.

b

Specify the name of the results variable as the WorkflowOutput property of the WaitForVcoWorkflowCompletion activity.

When the workflow runs, the value of the variable is set to the results of the vCenter Orchestrator workflow, if any.