Workflow
The platform6.workflow
service allows you to invoke a workflow step using given item primary key components.
Read the user guide of the Workflow service to discover its operating mode.
Invoke Workflow Step¶
This resource creates a new route if there is no route with the same identifier, otherwise, it does nothing.
Parameters¶
Headers of the request
Header’s key | Description | Value |
---|---|---|
platform6.request.action |
Mandatory: The action to perform (required) | invoke |
platform6.request.cluster |
Mandatory: Item Primary Key Component: cluster | |
platform6.request.concept |
Mandatory: Item Primary Key Component: concept | |
platform6.request.ids |
Mandatory: Item Primary Key Component: ids (comma separated list of ids) | |
status |
Mandatory: Initial status of message | |
step |
Mandatory: Workflow step id | |
appkey |
Optional: Override appKey used in step creation | |
script |
Optional: Name of step template script | |
pipelineVarN |
Optional: Pipeline values to pass to template script | |
flowName |
Optional: Fixed value for flow name. Use %UUID% to auto generated uuid formated flow name. |
Note
pipelineVarN parameters are historical in their use and format. In platform6, all request header values are available to a step template script via the pipeline() dsl
Headers of the response
Header’s key | Description |
---|---|
platform6.response.status |
true if the step was invoked, false if it failed for some reason |
platform6.response.value |
‘ok’ if invocation succeeded |
… | |
platform6.response.exception.message |
A failure message from the remote service |
platform6.response.exception |
The stack trace from the remote service |
Example - Via Route Deployment Script¶
.when(xpath("/TransactionMetaData/TechnicalStatusCode='Pending'")) .setHeader( 'platform6.request.action').constant('invoke') .setHeader('status').constant('PENDING') .setHeader('step').constant('Dispatch Field Ticket') .setHeader('flowname').constant('%UUID%') .to( 'p6route://workflow')
Note
Item Primary Key component headers are auto generated by the p6route component