View Workflow Step Tasks

get

/api/restapi/workflowInstance/steps/tasks

Send a request to this endpoint to view tasks under the given steps.

Request

Query Parameters

There's no request body for this operation.

Back to Top

Response

Supported Media Types

200 Response

Response will be in the format of Map<Long, Map<String, Map<DateTime, List<ApiEntityStepInstance>>>> which is a map of provided workflowInstanceId as key and value is a map of the step names as keys and their values are a map of start dates and list of their task instances as values.For example:
{
"1": [{
"completedDate": "2024-03-01T06:56:01",
"stepName": "Start",
"startedDate": "2024-03-01T06:56:00",
"workflowInstanceId": 1,
"tasksCompleted": 0,
"context": "P1",
"status": "FINISHED",
"workflowInstanceName": "Project Closeout"
},
{
"stepName": "Sponsor Decision",
"startedDate": "2024-03-01T06:56:33",
"workflowInstanceId": 1,
"tasksCompleted": 0,
"context": "P1",
"status": "EXECUTING",
"workflowInstanceName": "Project Closeout"
}],
"2": [{
"completedDate": "2024-03-01T07:18:49",
"stepName": "Start",
"startedDate": "2024-03-01T07:18:48",
"workflowInstanceId": 2,
"tasksCompleted": 1,
"context": "P1",
"status": "FINISHED",
"workflowInstanceName": "Project Closeout"
},
{
"stepName": "Sponsor Decision",
"startedDate": "2024-03-01T07:19:13",
"workflowInstanceId": 2,
"tasksCompleted": 1,
"context": "P1",
"status": "EXECUTING",
"workflowInstanceName": "Project Closeout"
}]
}
API fetches all the Task Instances records based on the given workflowInstanceIds, stepNames and the given OOTB (filtering, pagination, sorting, record count) query parameterss and then groups the results by workflowInstanceIds, stepNames & startDates at the end. OOTB feature is available on all the ApiEntityTaskInstance records and users can provide the ApiEntityTaskInstance fields (except for those mentioned in Unsupported Fields for Entity Filtering page) as OOTB query params. For example:
/api/restapi/workflowInstance/steps/tasks?workflowInstanceIds=1,2&stepNames=Complete Project Details and Checklist&filters=status=FINISHED&start=0,limit=5

Sorting will work inside the groups.

Since the response is in a form of a map, user need to follow the hierarchy for projection. In above response exmaple, to select 'status' for '1' workflowInstanceId, user should be to providing:/api/restapi/workflowInstance/steps/tasks?workflowInstanceIds=1,2&stepNames=Complete Project Details and Checklist&select=1.Complete Project Details and Checklist.2024-03-01T06:56:02.000Z.status
Body ()
Root Schema : List<ApiEntityTaskInstance>
Type: array
Title: List<ApiEntityTaskInstance>
Show Source
Nested Schema : ApiEntityTaskInstance
Type: object
Title: ApiEntityTaskInstance
Show Source
Nested Schema : performers
Type: array
List of performers that have been assigned to the task.
Show Source
Nested Schema : ApiEntityTaskPerformer
Type: object
Title: ApiEntityTaskPerformer
Show Source

204 Response

Successful operation with no content.

400 Response

Invalid Input.
Back to Top