Skip to content

Workflow Steps

The platform6.workflowsteps 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 a 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 The action to perform (required) invoke
platform6.request.dataPartition Item Primary Key Component: dataPartition (required)
platform6.request.dataType Item Primary Key Component: dataType (required)
platform6.request.ids Item Primary Key Component: ids (comma separated list of ids) (required)
status Initial status of message (required)
step Workflow step id (required)
appkey Override appKey used in step creation
script Name of step template script
pipelineVarN Pipeline values to pass to template script
flowName Fixed value for flow name. Use %UUID% to auto generated uuid formatted flow name.

Note

pipelineVarN parameters are historical in their use and format. In Platform 6, 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

Here an example via a 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://workflowsteps')               

Note

Item Primary Key component headers are auto generated by the P6route component.