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
-
stepNames: string
Comma separated user defined identifiers of workflow steps.
-
workflowInstanceIds(required): string
Comma separated system defined identifiers of workflow instances.
This is a required field.
There's no request body for this operation.
Back to TopResponse
Supported Media Types
- application/json
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=5Sorting 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
Root Schema : List<ApiEntityTaskInstance>
Type:
array
Title:
Show Source
List<ApiEntityTaskInstance>
-
Array of:
object ApiEntityTaskInstance
Title:
ApiEntityTaskInstance
Nested Schema : ApiEntityTaskInstance
Type:
object
Title:
Show Source
ApiEntityTaskInstance
-
completedDate: string
(date-time)
Date & Time of when the task was started.
-
completionPolicy: string
Allowed Values:
[ "ALL", "ANY", "MAJORITY" ]
Completion policy set for the task. -
context: string
Maximum Length:
0
Name of the context object on which the task is executed. -
formName: string
Applicable only for form tasks. Name of the form which is associated with the task.
-
formVersion: integer
(int64)
Applicable only for form tasks. Version of the form which is associated with the task.
-
performers: array
performers
List of performers that have been assigned to the task.
-
startedDate: string
(date-time)
Date & Time of when the task was started.
-
status: string
Allowed Values:
[ "EXECUTING", "FINISHED", "FAILED", "SKIPPED" ]
Current Status of the task. -
stepName: string
Maximum Length:
255
Name of the step within which the task is configured. -
taskName: string
Maximum Length:
255
Name of the task. -
taskType: string
Maximum Length:
60
Allowed Values:[ "Form", "Sub-workflow", "Portfolio Refresh", "Update Field", "Services", "Decision" ]
Type of task. -
workflowInstanceId: integer
(int64)
System generated unique identifier of the workflow instance.
-
workflowInstanceName: string
Maximum Length:
255
Name of the workflow instance within which the task is configured.
Nested Schema : performers
Type:
array
List of performers that have been assigned to the task.
Show Source
-
Array of:
object ApiEntityTaskPerformer
Title:
ApiEntityTaskPerformer
Nested Schema : ApiEntityTaskPerformer
Type:
object
Title:
Show Source
ApiEntityTaskPerformer
-
dateCompleted: string
(date-time)
The date and time when the performer completed the task.
-
status: string
Allowed Values:
[ "STOPPED", "FINISHED", "FAILED", "EXECUTING", "SKIPPED" ]
The status of the task assignment for the performer. -
userName: string
Maximum Length:
0
List of performers that have been assigned to the task.
204 Response
Successful operation with no content.
400 Response
Invalid Input.