Skip to content

Workflow Steps

Service Id: platform6.workflowsteps

1. Invoke Workflow Step

Header key Description Value
platform6.request.action The action to perform (required) invoke
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.

_A valid response will be:

Header 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.

2. Build JSON Workflow Step Given Xml and Assignees

Header key Description Value
platform6.request.action The action to perform (required) getStepConfJsonGivenXml
stepXml Workflow step as Xml (required)
assignees Comma separated list of assignee emails (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value JSON: (WorkflowStep)

3. Extract a Locale Keyed Map from the given Step Xml using the given Xpath

Header key Description Value
platform6.request.action The action to perform (required) getStepLocaleMap
stepXml Workflow step as Xml (required)
xpath Xpath selector of Locale Map (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value [Base64 encoded JSON Map]

4. Remove Work Item given its Id

Header key Description Value
platform6.request.action The action to perform (required) removeWorkItem
id Work Item id (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value [id removed]

5. Remove Workflow Task given its InstanceId, Data Type and List of Ids

Header key Description Value
platform6.request.action The action to perform (required) removeWorkflowTask
instanceid Workflow instance id (required)
dataType Transaction data type (required)
ids Comma separated list of Transaction index ids (required)

A valid response will be:

Header key Description
platform6.response.status OK

6. List all Active Workflow Step Names

Header key Description Value
platform6.request.action The action to perform (required) getStepNames

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value [Base64 encoded JSON List]

7. List All Workflow Step Assignees Given Step Name

Header key Description Value
platform6.request.action The action to perform (required) getAssignees
stepName Active Workflow Step Name (required)
checked Force reevaluation of assignees (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value [Base64 encoded JSON List>]

8. Test if Given User Email is an Assignee

Header key Description Value
platform6.request.action The action to perform (required) isAssignee
userEmail Assignee USer Email (required)
inline Check all persisted workflow tasks (required)

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value true

9. Get List of All Active Workflow Task Ids

Header key Description Value
platform6.request.action The action to perform (required) getAllActiveWorkItemIds

A valid response will be:

Header key Description
platform6.response.status OK
platform6.response.value [Base64 encoded JSON List]

10. Force a Rebuild Of the Workflow Assignee Cache

Header key Description Value
platform6.request.action The action to perform (required) assigneesChanged

A valid response will be:

Header key Description
platform6.response.status true

11. Reevaluate The Workflow Assignees Given Work Item Id

Header key Description Value
platform6.request.action The action to perform (required) syncAssignees
workItemId Assignee USer Email (required)
inline Check all persisted workflow tasks (required)

A valid response will be:

Header key Description
platform6.response.status true
platform6.response.value “Assignee update successful. Work item has: n assignees.”

12. Action Workflow Step Given Workflow Task Id

Header key Description Value
platform6.request.action The action to perform (required) action.workflow.task
wfId Workflow Task Id (required)

A valid response will be:

Header key Description
platform6.response.status true
platform6.response.value JSON Map: workflow pipeline variables