Orchestrate User Task

These actions provide ability to include human actions and time delays in API calls.

Orchestrate User Task Actions

StartTask

Records current event as a process entry assigned to a user or group, to proceed after a trigger or timeout after given time. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Domain

Name of the state manager to store process data in

workflow

-

Input Element

Json path for storing data to return on proceeding process

process.data

-

With event metadata parameters as:

Parameter
Definition
Example
Default

Input Pattern

JMESPath pattern to apply on data input

{data: process.data}

-

Task Id Path

Json path which defines id for storing the process

process.id

taskId

Task Name

Descriptive name for the task

Job Post Approval

-

Task Spec

Task specification (i.e. reference name for the process flow)

job_post_approval

-

Task Action

Referential name of the action

Approve

-

Task Roles

Comma separated list of user roles allowed to process task

admin,manager

-

Task User

ID of user allowed to process task

user123

-

Timeout

Milliseconds to timeout started process after

60000

-

Timeout On

Epoch time in ms to timeout started process on

1666765654

-

chevron-rightExamplehashtag

Input

{
    "parameters": {
        "productId": "product-1",
        "brief": "Image and video creation with summer vibes" 
    }
}

Event Metadata

circle-info

StartTask action can be followed with an event status condition step in sagas, for escalation of tasks not completed in timeout duration. The "TIMEOUT" condition value can be used for such flows.

ProceedTask

Triggers proceeding of an existing process entry, enriching with stored event data. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Domain

Name of the state manager keeping process data

workflow

-

Input Element

Json path for the input in request event payload

parameters

-

Output Element

Json path for the output in response event payload

process

-

With event metadata parameters as:

Parameter
Definition
Example
Default

Input Pattern

JMESPath pattern to apply on data input

{data: newData}

-

Output Pattern

JMESPath pattern to apply on enrich data output, before returning response

{stored: oldData}

-

Task Id Path

Json path which defines id for proceeding the process

id

[requestId]:[sagaStepId][runnerPartition]

Enrich Path

Json path to use for enriching proceeded process event data

newData

-

circle-info

Typically a global, generic /ProceedTask endpoint is used for triggering progression of tasks assigned to users across all sagas.

However, it is typically preferred to have the ProceedTask action running on the same runner performing StartTask sagas, as they typically need to have access to the same state managers (e.g. approval states).

TimeoutTask

Triggers timeout of an already started process, enriching with input event data. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Domain

Name of the state manager keeping process data

workflow

-

Input Element

Json path for the input in request event payload

parameters

-

Output Element

Json path for the output in response event payload

process

-

With event metadata parameters as:

Parameter
Definition
Example
Default

Input Pattern

JMESPath pattern to apply on data input

{data: newData}

-

Output Pattern

JMESPath pattern to apply on enrich data output, before returning response

{stored: oldData}

-

Task Id Path

Json path which defines id for timed out process

id

[requestId]:[sagaStepId][runnerPartition]

Enrich Path

Json path to use for enriching timed out process event data

newData

-

circle-info

Tasks that are created with StartTask automatically timeout based on their parameter values. This task provides an extra facility to timeout records manually.

TimeoutBetween

Triggers timeout of all processes with timeout time within the given range. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Input Element

Json path for the input in request event payload

parameters

-

With event metadata parameters as:

Parameter
Definition
Example
Default

From Time Path

Json path for "from time" of timeouts

start

Last timeout

To Time Path

Json path for "to time" of timeouts (updates last timeout)

end

-

Last updated