The advanced workflow component (in the other category), Complete approval process is a component, that has been added for installations, that have chosen to use versioning and combine that with approvals.
The workflow component outputs the result of the approval into the XML payload and this is a suggestion for implementation:
The parameter, approval outcome is the node into which the result of the approval is to be stored. This will affect the specified node of the payload. You can use this node e.g. to condition other subsequent workflow components e.g. to report the approval/rejection.
This workflow component should be executed after the component, Await approval in a workflow of the input type, Start approval process.
The payload looks like this:
<?xml version='1.0' encoding='UTF-8'?> <changeRequest> <id>ID-1693228252119-0-1</id> <approvalFlowName>Standard</approvalFlowName> <username>TestUser</username> <resourceType>template</resourceType> <path>/test_template.ift</path> <additionalResources> <resource index='1'> <resourceType>component</resourceType> <path>/test_component.icmp</path> </resource> </additionalResources> <majorVersion>false</majorVersion> <description>This is a description of what was changed</description> <decision>Approve</decision> <approver>ApproverUser</approver> <approverComments>Looking very good</approverComments> </changeRequest>
|
So you can e.g. report the approval/rejection back to the user, that changed the resource, as the user is found in the node: /changeRequest/username.
An example for an approval workflow can be found here.