You must configure your vRealize Orchestrator workflows to support the IaaS service message.

Provisioning and Life Cycle Event Topic Schema

The machine provisioning and machine life cycle event topics use the same life cycle schema. The differences are in the triggering states. Machine provisioning receives messages based on provisioning states and events, and machine life cycle receives messages based on active states and events. Some provisioning states include BuildingMachine and Disposing. Some life cycle states include InstallTools and Off.

The event message is the event data payload. The following is the structure of the event data payload.

{
  machine : {
      id                : STRING,      /* IaaS machine ID */
      name              : STRING,      /* machine name */
      externalReference : STRING,      /* machine ID on the hypervisor */
      owner             : STRING,      /* machine owner */ 
      type              : INTEGER,     /* machine type: 0 - virtual machine; 1 - physical machine; 2 - cloud machine */ 
      properties        : Properties   /* machine properties, see notes below how to expose virtual machine properties */            
  },
  blueprintName   : STRING,      /* blueprint name */
  componentId     : STRING,      /* component id */
  componentTypeId : STRING,      /* component type id */
  endpointId      : STRING,      /* endpoint id */
  requestId       : STRING,      /* request id */
  lifecycleState  : {												/* see Life Cycle State Definitions*/
      state : STRING,
      phase : STRING,
      event : STRING
  },
  virtualMachineEvent                 : STRING,     /* fire an event on that machine - only processed by Manager Service as consumer */
  workflowNextState                   : STRING,     /* force the workflow to a specific state - only processed by Manager Service as consumer */
  virtualMachineAddOrUpdateProperties : Properties, /* properties on the machine to add/update - only processed by Manager Service as consumer */
  virtualMachineDeleteProperties      : Properties  /* properties to remove from the machine - only processed by Manager Service as consumer */
}

The vRealize Orchestrator parameters are mapped to the event's payload by name and type.

When you use virtualMachineEvent and workflowNextState as output parameters, the values that you provide must represent a state or event from the workflow that triggered the event and started the current vRealize Orchestrator workflow. To review the possible life cycle states and events, see VMPS Master Workflow Life Cycle States and Provisioning Life Cycle States by Machine Type.

Working with Extensibility Custom Properties

The virtual machine custom properties are not included in the event payload unless they are specified as an extensibility custom property for the life cycle state. You can add these properties to IaaS endpoints, reservations, blueprints, requests, and other objects that support custom properties.

The format of the custom property that you add to an object is Extensibility.Lifecycle.Properties.{workflowName}.{stateName}.

For example, if you want to include hidden properties and all properties starting with "Virtual" when the virtual machine state is BuildingMachine, you add the custom properties to the machine in the blueprint. The custom property name for this example is Extensibility.Lifecycle.Properties.VMPSMasterWorkflow32.BuildingMachine, and the values are __* and Virtual*, separated by a comma.

The double underscore (__*) includes the hidden properties. The Virtual* value includes all properties that begin with virtual. The asterisk (*) is a wildcard and can be used as the only value, but using the wildcard this way results in the transfer of large amounts of data.

If you have multiple, subsequently triggered workflow subscriptions that include custom properties, you must include the appropriate entries in the workflows to ensure that the payload check retains the custom properties.

Table 1. Task Entries to Preserve Custom Properties

State

Task Entries

Added or updated custom properties

virtualMachineAddOrUpdateProperties = payload.virtualMachineAddOrUpdateProperties || new Properties();

Deleted custom properties

virtualMachineDeleteProperties = payload.virtualMachineDeleteProperties || new Properties();

Creating a vRealize Orchestrator Workflow Based on the Life Cycle or Provisioning Schema

The custom workflow that you create must have an input parameter that is payload with the type Properties. The provisioning or life cycle event data payload is put in this parameter when the workflow runs in vRealize Orchestrator. You can also include separate input parameters that match the name and the type of the fields in the event's payload.