BREAGEN Logo
Business Process

Tasks

Tasks - Complete a Task POST /tasks/complete/{taskId}

Resource URL/api/v1/tasks/complete/{taskId}
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
taskIdThe ID of the task to completeYesStringN/A

Example Request

curl -X 'POST' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/complete/task-001' \
-H 'accept: */*'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Task completed successfully",
  "data": {
    "id": "task-001",
    "name": "Review Order",
    "assignee": "user1",
    "processInstanceId": "proc-001",
    "taskDefinitionKey": "review-order",
    "createTime": "2025-04-08T10:00:00Z",
    "dueDate": "2025-04-10T10:00:00Z",
    "priority": 50,
    "owner": null,
    "tenantId": "tenant-1",
    "appVersion": 1,
    "delegationState": null,
    "description": "Review the order details",
    "suspended": false,
    "formKey": null,
    "executionId": "exec-001",
    "businessKey": "order-123",
    "processDefinitionId": "order-process:1:123",
    "claimTime": null,
    "processVariables": {
      "user": "john",
      "amount": 100
    },
    "taskLocalVariables": {},
    "variables": []
  }
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error

Tasks - Complete a Task with Variables POST tasks/complete-with-variables/{taskId}

Resource URL/api/v1/tasks/complete-with-variables/{taskId}
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
taskIdThe ID of the task to completeYesStringN/A
(Request Body)Variables to submit with task completionYesObjectN/A

Request Body

The request body is a JSON object containing key-value pairs of variables:

PropertyDescriptionRequiredTypeExample Value
(Variables)Key-value pairs of task variablesYesObject{"approved": true, "comments": "Looks good"}

Example Request

curl -X 'POST' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/complete-with-variables/task-001' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
    "approved": true,
    "comments": "Looks good"
}'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Task completed with variables successfully",
  "data": {
    "id": "task-001",
    "name": "Review Order",
    "assignee": "user1",
    "processInstanceId": "proc-001",
    "taskDefinitionKey": "review-order",
    "createTime": "2025-04-08T10:00:00Z",
    "dueDate": "2025-04-10T10:00:00Z",
    "priority": 50,
    "owner": null,
    "tenantId": "tenant-1",
    "appVersion": 1,
    "delegationState": null,
    "description": "Review the order details",
    "suspended": false,
    "formKey": null,
    "executionId": "exec-001",
    "businessKey": "order-123",
    "processDefinitionId": "order-process:1:123",
    "claimTime": null,
    "processVariables": {
      "user": "john",
      "amount": 100
    },
    "taskLocalVariables": {
      "approved": true,
      "comments": "Looks good"
    },
    "variables": []
  }
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error

Tasks - Tasks of a Process GET tasks/{processInstanceId}

Resource URL/api/v1/tasks/{processInstanceId}
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
processInstanceIdThe ID of the process instance to retrieve tasks forYesStringN/A

Example Request

curl -X 'GET' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/proc-001' \
-H 'accept: */*'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Tasks retrieved successfully",
  "data": [
    {
      "id": "task-001",
      "name": "Review Order",
      "assignee": "user1",
      "processInstanceId": "proc-001",
      "taskDefinitionKey": "review-order",
      "createTime": "2025-04-08T10:00:00Z",
      "dueDate": "2025-04-10T10:00:00Z",
      "priority": 50,
      "owner": null,
      "tenantId": "tenant-1",
      "appVersion": 1,
      "delegationState": null,
      "description": "Review the order details",
      "suspended": false,
      "formKey": null,
      "executionId": "exec-001",
      "businessKey": "order-123",
      "processDefinitionId": "order-process:1:123",
      "claimTime": null,
      "processVariables": {
        "user": "john",
        "amount": 100
      },
      "taskLocalVariables": {},
      "variables": []
    }
  ]
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error

Tasks - Form Properties of a Task GET tasks/task-form-properties

Resource URL/api/v1/tasks/task-form-properties
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
taskIdThe ID of the task to retrieve form properties forYesStringN/A

Example Request

curl -X 'GET' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/task-form-properties?taskId=task-001' \
-H 'accept: */*'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Form properties retrieved successfully",
  "data": [
    {
      "id": "prop-001",
      "name": "approved",
      "type": "boolean",
      "variable": "approved",
      "required": true
    },
    {
      "id": "prop-002",
      "name": "comments",
      "type": "string",
      "variable": "comments",
      "required": false
    }
  ]
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error

Tasks - All Statuses of a Process GET tasks/statuses

Resource URL/api/v1/tasks/statuses
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
processInstanceIdThe ID of the process instance to retrieve statuses forYesStringN/A

Example Request

curl -X 'GET' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/statuses?processInstanceId=proc-001' \
-H 'accept: */*'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Statuses retrieved successfully",
  "data": [
    {
      "id": "startEvent",
      "name": "Start",
      "type": "startEvent"
    },
    {
      "id": "review-order",
      "name": "Review Order",
      "type": "userTask"
    },
    {
      "id": "endEvent",
      "name": "End",
      "type": "endEvent"
    }
  ]
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error

Tasks - Next Possible Tasks of the Process GET tasks/next-possible-tasks

Resource URL/api/v1/tasks/next-possible-tasks
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
currentTaskIdThe ID of the current task to find next possible tasks forYesStringN/A

Example Request

curl -X 'GET' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/next-possible-tasks?currentTaskId=task-001' \
-H 'accept: */*'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Next possible tasks retrieved successfully",
  "data": [
    {
      "id": "task-002",
      "name": "Approve Order",
      "documentation": "Approve the order after review",
      "extensionElements": {},
      "attributes": {},
      "condition": null
    },
    {
      "id": "task-003",
      "name": "Reject Order",
      "documentation": "Reject the order if issues found",
      "extensionElements": {},
      "attributes": {},
      "condition": null
    }
  ]
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error

Tasks - Historic Activities of a Process GET tasks/historic-activities

Resource URL/api/v1/tasks/historic-activities
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
processInstanceIdThe ID of the process instance to retrieve historic activities forYesStringN/A

Example Request

curl -X 'GET' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/historic-activities?processInstanceId=proc-001' \
-H 'accept: */*'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Historic activities retrieved successfully",
  "data": [
    {
      "id": "act-001",
      "processDefinitionId": "order-process:1:123",
      "activityName": "Start",
      "processInstanceId": "proc-001",
      "tenantId": "tenant-1",
      "assignee": null,
      "executionId": "exec-001",
      "startTime": "2025-04-08T10:00:00Z",
      "activityId": "startEvent",
      "taskId": null,
      "deleteReason": null,
      "activityType": "startEvent",
      "calledProcessInstanceId": null,
      "endTime": "2025-04-08T10:01:00Z",
      "durationInMillis": 60000,
      "time": "2025-04-08T10:00:00Z"
    },
    {
      "id": "act-002",
      "processDefinitionId": "order-process:1:123",
      "activityName": "Review Order",
      "processInstanceId": "proc-001",
      "tenantId": "tenant-1",
      "assignee": "user1",
      "executionId": "exec-001",
      "startTime": "2025-04-08T10:01:00Z",
      "activityId": "review-order",
      "taskId": "task-001",
      "deleteReason": null,
      "activityType": "userTask",
      "calledProcessInstanceId": null,
      "endTime": "2025-04-08T10:15:00Z",
      "durationInMillis": 840000,
      "time": "2025-04-08T10:01:00Z"
    }
  ]
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error

Tasks - Current Tasks of a Process GET tasks/current

Resource URL/api/v1/tasks/current
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
processInstanceIdThe ID of the process instance to retrieve current tasks forYesStringN/A

Example Request

curl -X 'GET' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/current?processInstanceId=proc-001' \
-H 'accept: */*'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Current tasks retrieved successfully",
  "data": [
    {
      "id": "task-001",
      "name": "Review Order",
      "assignee": "user1",
      "processInstanceId": "proc-001",
      "taskDefinitionKey": "review-order",
      "createTime": "2025-04-08T10:00:00Z",
      "dueDate": "2025-04-10T10:00:00Z",
      "priority": 50,
      "owner": null,
      "tenantId": "tenant-1",
      "appVersion": 1,
      "delegationState": null,
      "description": "Review the order details",
      "suspended": false,
      "formKey": null,
      "executionId": "exec-001",
      "businessKey": "order-123",
      "processDefinitionId": "order-process:1:123",
      "claimTime": null,
      "processVariables": {
        "user": "john",
        "amount": 100
      },
      "taskLocalVariables": {},
      "variables": []
    }
  ]
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error

Tasks - Completed Tasks of a Process GET tasks/completed

Resource URL/api/v1/tasks/completed
Response FormatJSON
Requires AuthenticationNot specified
Rate LimitedNot specified
HTTPSAssumed Yes

Parameters

ParameterDescriptionRequiredTypeDefault Value
processInstanceIdThe ID of the process instance to retrieve completed tasks forYesStringN/A

Example Request

curl -X 'GET' \
'http://activity-be-chicago-dev.braegen.ai/api/v1/tasks/completed?processInstanceId=proc-001' \
-H 'accept: */*'

Example Response

{
  "isError": false,
  "statusCode": "200",
  "message": "Completed tasks retrieved successfully",
  "data": [
    {
      "id": "task-001",
      "name": "Review Order",
      "assignee": "user1",
      "processInstanceId": "proc-001",
      "taskDefinitionKey": "review-order",
      "createTime": "2025-04-08T10:00:00Z",
      "dueDate": "2025-04-10T10:00:00Z",
      "claimTime": "2025-04-08T10:05:00Z",
      "startTime": "2025-04-08T10:00:00Z",
      "endTime": "2025-04-08T10:15:00Z",
      "durationInMillis": 900000,
      "workTimeInMillis": 600000,
      "priority": 50,
      "owner": null,
      "description": "Review the order details",
      "processDefinitionId": "order-process:1:123",
      "category": null,
      "formKey": null,
      "tenantId": "tenant-1",
      "parentTaskId": null,
      "executionId": "exec-001",
      "businessKey": "order-123",
      "processVariables": {
        "user": "john",
        "amount": 100
      },
      "taskLocalVariables": {
        "approved": true
      },
      "deleteReason": null,
      "time": "2025-04-08T10:00:00Z"
    }
  ]
}

HTTP Responses

HTTP CodeMessage
200Successful Response
400Bad Request
404Not Found
500Internal Server Error