You must configure your custom vRealize Orchestrator workflow to support the approval message and to reply with correctly formatted information that vRealize Automation can process.

Approval Event Topic Schema

The pre-approval and post-approval event message schema includes the field names and values, the information included in the request, and information about the source of the request.

The following is the structure of the event data payload.

    fieldNames : Properties,            // Property names
    fieldValues : Properties,           // Property values
    // Information about the request
    requestInfo : {
        requestRef : STRING,            // Identifier for the source request
        itemName : STRING,              // Name of the requested item
        itemDescription : STRING,       // Description of the requested item
        reason : STRING,                // Justification provided by the user specifying why the request is required
        description : STRING,           // Description entered by the user specifying the purpose of the request
        approvalLevel:ExternalReference,// Approval level ID. This is a searchable field
        approvalLevelName : STRING,     // Approval level name
        createDate : DATE_TIME,         // Time the approval request is created
        requestedFor : STRING,          // Principal id of the user for whom the source request is initiated
        subtenantId : STRING,           // Business group id
        requestedBy : STRING            // Principal id of the user who actually submits the request
    // Information about the source of the request
    sourceInfo : {
        externalInstanceId : STRING,    // Identifier of the source object, as defined by the intiator service
        serviceId : STRING,             // Identifier of the service which initiated the approval
        externalClassId : STRING        // Identifier of the class to which the source object belongs

Property names and property values can be the custom properties or system properties that you configure in the approval policy level. These properties are configured in the approval policy to allow the approver to change the values during an approval process. For example, if CPU is included, the approver can decrease the number of CPUs in the approval request form.

The reply event data payload is the information that it returned to vRealize Automation by the workflow. The contents of the reply payload determines whether the request is approved or rejected.

    approved : BOOLEAN,                
    // Property values
    fieldValues : Properties

The approved parameter in the reply event payload is either true, for approved, or false, for rejected requests. The property values are the custom or system properties that were modified by the vRealize Orchestrator workflow and returned to vRealize Automation and included in the approval process.

As a best practice, you should configure the vRealize Orchestrator workflow with an output parameter for businessJustification. You can use this parameter to pass comments provided by the approver in the outside system to the vRealize Automation approval process. These comments can be for approvals or rejections.

Creating a vRealize Orchestrator Workflow Based on the Approval Schema

The custom approval workflow that you create must have an input parameter, with any useful name, that is configured with the type Properties. The approval event data payload is put into this parameter when the workflow subscription is triggered to run.

The output parameters of the workflow that are sent back to vRealize Automation are approved : Boolean and fieldValues : Properties. The returned approved : Boolean parameter determines if the approval level is approved or rejected. The fieldValues : Properties parameter contains the values that were modified in the external system.