This documentation is about a version that is out of support, here is the latest documentation version.

How about downloading a newer, supported version?

Easily manage activities, tasks and flow nodes with BPM APIs.

Activities and Tasks

Activity

Description

Use this resource to retrieve activities (human or service tasks), call activities, and subprocesses currently running on the platform. It enables you to perform maintenance tasks like skipping or replaying a failed task and modifying variables.

Identifier

The ID of the activity (a long value).

Representation

{
  "id": "the activity id (long)",
  "type": "the activity type (string)",
  "name": "the activity technical name (string)",
  "displayName": "the human readable activity name (string)",
  "description": "the activity description (string)",
  "displayDescription": "the human readable activity description (string)",
  "state": "the current state of the activity (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this activity reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this activity was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this activity is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current activity",

  "processId": "the process definition id (long) of the case which define this activity",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this activity. The activity has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the activity in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this activity, null otherwise",
  "assigned_id": "the user id (long) that this activity is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current activity was assigned, for example '2014-10-17 16:05:42.626'"
}
States:
  • failed

  • initializing

  • ready

  • executing

  • completing

  • completed

  • waiting

  • skipped

  • cancelled

  • aborted

  • cancelling subtasks

Types:
  • AUTOMATIC_TASK

  • HUMAN_TASK

  • USER_TASK

  • MANUAL_TASK

  • LOOP_ACTIVITY

  • MULTI_INSTANCE_ACTIVITY

  • CALL_ACTIVITY

Priorities:
  • highest

  • above_normal

  • normal

  • under_normal

  • lowest

Methods

The methods used for this resource are:

  • GET - Read an activity or search for an activity

  • PUT - Update an activity

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId

  • caseId

  • rootCaseId

  • parentCaseId

  • rootContainerId

  • executedBy

  • executedBySubstitute (only in Efficiency, Performance and Enterprise editions)

  • actorId

  • assigned_id

  • parentTaskId

Update activity variables

if there is no data with the specified name in the activity, the update will be applied to the process data if a variable with the specified name exists.
  • URL
    /API/bpm/activity/:id

  • Method
    PUT

  • Request Payload

    {
      "variables": "[{\"name\":\"foo\",\"value\":\"bar\"}]"
    }
  • Success Response

    • Code: 200

Update activity variables and execute a task

Note: if the task definition includes a connector that is executed on finish and updates the value of a variable, the value set by the REST API call is overwritten.

  • URL
    /API/bpm/activity/:id

  • Method
    PUT

  • Request Payload

    {
      "state": "completed",
      "variables": "[{\"name\":\"foo\",\"value\":\"bar\"}]"
    }
  • Success Response

    • Code: 200

Skip activity

  • URL
    /API/bpm/activity/:id

  • Method
    PUT

  • Request Payload

    {
      "state": "skipped"
    }
  • Success Response

    • Code: 200

Replay activity

Make this call after all failed connectors have been reset. (only in Performance and Enterprise editions)

  • URL
    /API/bpm/activity/:id

  • Method
    PUT

  • Request Payload

    { "state": "replay" }
  • Success Response

    • Code: 200

Get an activity

Retrieve the activity information for the given id.

  • URL
    /API/bpm/activity/:id

  • Method
    GET

  • Success Response
    The JSON representation of the specified activity

    • Code: 200

    • Payload:

      {
        "displayDescription": "validate expense request",
        "executedBySubstitute": "0",
        "caseId": "76539",
        "parentCaseId": "68743",
        "rootCaseId": "65879",
        "processId": "7012",
        "rootContainerId": "7000",
        "state": "completed",
        "type": "the activity type as a string",
        "assigned_id": "304",
        "assigned_date": "2014-10-17 16:05:42.626",
        "id": "809764",
        "executedBy": "0",
        "priority": "the priority of the current activity as a string",
        "actorId": "50",
        "description": "In this step, a manager reviews and validates an expense request.",
        "name": "Validate",
        "reached_state_date": "2014-10-18 10:37:05.643",
        "displayName": "Validate expense request",
        "dueDate": "2014-10-21 16:05:42.626",
        "last_update_date": "2014-10-18 10:37:05.643"
      }

Search among activities

Search for flow activities using given parameters. Activities in states completed, cancelled, or aborted are not retrieved. The search returns an array of activities.

  • URL
    /API/bpm/activity
    Example: Get all the active activities named "Escalate", ordering the results by state: /API/bpm/activity?p=0&c=10&f=name%3dEscalate&o%3dstate%20ASC

  • Method
    GET

  • Data Params
    For this resource, the available state search parameters for the GET verb are the same as for the flow nodes.
    The following search parameters are available:

    • o:

      • name

      • displayName

      • state

      • processDefinitionId

      • parentProcessInstanceIdo

      • parentActivityInstanceId (order by parent activity id)

      • rootProcessInstanceId

      • lastUpdateDate

    • s: search on any field that can be used to order results

    • f:

      • name

      • state

      • processId

      • parentCaseId

      • rootCaseId

      • last_update_date

      • supervisor_id (only in Efficiency, Performance and Enterprise editions)

    • d: extend resource response parameters of this resource are available.

  • Success Response
    An array of JSON representations of activities

    • Code: 200

ArchivedActivity

Description

Use this resource to retrieve finished activities (human or service tasks), call activities, and subprocesses.

For this resource, the available state search parameters for the GET verb are the same as for the archived flow nodes.

Identifier

The ID of the archived activity (a long value). This is different from the ID of the activity before it was archived.

Representation

{
  "id": "the archived activity id (long)",
  "type": "the archived activity type (string)",
  "name": "the archived activity technical name (string)",
  "displayName": "the human readable archived activity name (string)",
  "description": "the archived activity description (string)",
  "displayDescription": "the human readable archived activity description (string)",
  "state": "the current state of the archived activity (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived activity reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived activity was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived activity is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current archived activity",

  "processId": "the process definition id (long) of the case which define this archived activity",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this archived activity. The archived activity has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the archived activity in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this archived activity, null otherwise",
  "assigned_id": "the user id (long) that this archived activity is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current archived activity was assigned, for example '2014-10-17 16:05:42.626'",

  "sourceObjectId": "the original id of the archived activity before it was archived",
  "archivedDate": "the date (('yyyy-MM-dd HH:mm:ss.SSS')) when this archived activity was archived, for example '2014-10-17 16:05:42.626'"
}
States:
  • failed

  • initializing

  • ready

  • executing

  • completing

  • completed

  • waiting

  • skipped

  • cancelled

  • aborted

  • cancelling subtasks

Types:
  • AUTOMATIC_TASK

  • HUMAN_TASK

  • USER_TASK

  • MANUAL_TASK

  • CALL_ACTIVITY

  • LOOP_ACTIVITY

  • MULTI_INSTANCE_ACTIVITY

  • SUB_PROCESS

Priorities:
  • highest

  • above_normal

  • normal

  • under_normal

  • lowest

Methods

The methods used for this resource are:

  • GET - Read a resource or search for an archived activity

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId: the id of the process that is associated with the activity

  • caseId: the id of the case that is associated with the activity

  • rootCaseId: the root case that is associated with this activity’s case

  • parentCaseId: the parent case that is associated with this activity’s case

  • rootContainerId: the root process of the root case that is associated with this activity

  • executedBy: the user who executed the activity

  • executedBySubstitute: the user who executed the activity for the executedBy user (only in Effeciency, Performance and Enterprise editions)

  • actorId: the actor that can execute this activity

  • assigned_id: the user this activity is assigned to

  • parentTaskId: in the case of a subtask, the parent task

Get an archived activity

Retrieve the activity information for the given id.

  • URL
    /API/bpm/archivedActivity/:id

  • Method
    GET

  • Success Response
    The JSON representation of the specified activity

    • Code: 200

Search among archived activities

Search for archived activities using given parameters. Only archived activities in a final state are retrieved (completed, cancelled, aborted). It returns an array of archived activities.

  • URL
    /API/bpm/archivedActivity

  • Method
    GET

  • Data Params
    The following search parameters are available:

    • o:

      • name : the name of this activity

      • displayName : the display name of this activity

      • state : the current state of the activity

      • type : the activity type

      • isTerminal : say whether or not the activity is in a terminal state

      • processId : the process this activity is associated to

      • caseId : the case initiator this activity is associated to

      • reached_state_date : the date when this activity arrived in this state

    • f:

      • supervisor_id: retrieve the information the process manager associated to this id has access to (only in Efficiency, Performance and Enterprise editions)

      • f: same as the sort order fields

    • d: extend resource response parameters of this resource are available.

  • Success Response
    An array of JSON representations of the specified activities

    • Code: 200

      [#human-task]

HumanTask

Description

A Human task is Manual task or a User task. A User task is a task that can be done by a user. A Manual task is a subtask of a user task, and is also done by a user.

Identifier

Simple, the ID of the object (a long value)

Representation

{

  "id": "the task id (long)",
  "type": "the task type (string): USER_TASK | MANUAL_TASK",
  "name": "the task technical name (string)",
  "displayName": "the human readable task name (string)",
  "description": "the task description (string)",
  "displayDescription": "the human readable task description (string)",
  "state": "the current state of the task (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current task",

  "processId": "the process definition id (long) of the case which define this task",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this task. The task has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the task in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this task, null otherwise",
  "assigned_id": "the user id (long) that this task is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current task was assigned, for example '2014-10-17 16:05:42.626'"
}

Methods

The methods used for this resource are:

  • GET - Read a resource

  • PUT - Update a resource

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId: the id of the process that is associated with the activity

  • caseId: the id of the case that is associated with the activity

  • rootCaseId: the root case that is associated with this activity’s case

  • parentCaseId: the parent case that is associated with this activity’s case

  • rootContainerId: the root process of the root case that is associated with this activity

  • executedBy: the user who executed the activity

  • executedBySubstitute: the user who executed the activity for the executedBy user (only in Effeciency, Performance and Enterprise editions)

  • actorId: the actor that can execute this activity

  • assigned_id: the user this activity is assigned to

  • parentTaskId: in the case of a subtask, the parent task

Actions

Retrieve a humanTask
  • URL
    /API/bpm/humanTask/:taskId

  • Method
    GET

  • Success Response
    Returns a Human task representation

    • Code: 200

    • Payload:

      {
        "displayDescription":"",
        "executedBySubstitute":"0",
        "processId":"5826139717723008213",
        "state":"ready",
        "rootContainerId":"1002",
        "type":"USER_TASK",
        "assigned_id":"",
        "assigned_date":"",
        "id":"20004",
        "executedBy":"0",
        "caseId":"1002",
        "priority":"normal",
        "actorId":"102",
        "description":"",
        "name":"Analyse case",
        "reached_state_date":"2014-09-05 11:11:30.808",
        "displayName":"Analyse case",
        "dueDate":"2014-09-05 12:11:30.775",
        "last_update_date":"2014-09-05 11:11:30.808"
      }
Search for a humanTask

Retrieve humanTask objects that match the specified filters.

  • URL
    /API/bpm/humanTask
    Example: Get the human tasks that have been skipped. /API/bpm/humanTask?p=0&c=10&f=state=skipped

  • Method
    GET

  • Data Params
    Standard search parameters are available:

    • d: extend resource response parameters of this resource are available.

    • o: name, priority, dueDate, state, processDefinitionId, processInstanceId, parentActivityInstanceId, assigneeId, parentContainerId, displayName, reachedStateDate

    • s: search on any field that can be used to order results

    • f: assigned_id, state, name, displayName, processDefinitionId, caseId, parentCaseId, rootCaseId

    For instance, you can filter on:

    • assigned_id={user_id}: retrieve only the human tasks assigned to the specified ID. For example, retrieve the human tasks assigned to user with id 2: /API/bpm/humanTask?p=0&c=10&f=assigned_id%3d2

    • state=: retrieve only the archived user tasks with the specified state. For example, retrieve the skipped tasks: /API/bpm/humanTask?p=0&c=10&f=state=skipped

    • name=: retrieve only the human tasks with the specified name. For example, retrieve the human tasks with the name "Analyse Case": /API/bpm/humanTask?p=0&c=10&f=name=Analyse Case

    • displayName=: retrieve only the archived user tasks with the specified displayName. For example, retrieve the human tasks with the displayName "Analyse Case": /API/bpm/humanTask?p=0&c=10&f=displayName=Analyse Case

  • Success Response

    • Code: 200

    • Payload:
      The results are paged using the standard search parameters, with a maximum of 10 results returned in each page. The first set of results are returned. In this example, two results are returned.

      [
        {
          "displayDescription":"Case analysis",
          "executedBySubstitute":"0",
          "processId":"5826139717723008213",
          "state":"skipped",
          "rootContainerId":"1002",
          "type":"USER_TASK",
          "assigned_id":"974",
          "assigned_date":"2014-09-05 09:19:30.150",
          "id":"20004",
          "executedBy":"0",
          "caseId":"1002",
          "priority":"normal",
          "actorId":"102",
          "description":"",
          "name":"Analyse case",
          "reached_state_date":"2014-09-05 11:11:30.808",
          "displayName":"Analyse case",
          "dueDate":"2014-09-05 12:11:30.775",
          "last_update_date":"2014-09-05 11:11:30.808"
        }, {
          "displayDescription":"Validate case",
          "executedBySubstitute":"0",
          "processId":"5826139717723007999",
          "state":"skipped",
          "rootContainerId":"1010",
          "type":"USER_TASK",
          "assigned_id":"971",
          "assigned_date":"2014-09-06 10:29:30.766",
          "id":"20004",
          "executedBy":"0",
          "caseId":"1023",
          "priority":"normal",
          "actorId":"102",
          "description":"",
          "name":"Validate case",
          "reached_state_date":"2014-09-06 12:10:50.744",
          "displayName":"Validate case",
          "dueDate":"2014-09-06 12:11:30.775",
          "last_update_date":"2014-09-06 12:10:50.744"
        }
      ]

Update a humanTask

Description

Fields that can be updated are assignedId and state. Specify only those fields that you want to change.

  • URL
    /API/bpm/humanTask/:taskId

  • Method
    PUT

  • Request Payload

    {
      "assigned_id" : "new_user_id",
      "state": "new_state"
    }
  • Success Response

    • Code: 200

      === ManualTask

Description

Use the manualTask resource to access process subtasks. For archived subtasks use archivedManualTask.

Identifier

Simple, the ID of the object (a long value)

Representation

{
  "id": "the task id (long)",
  "type": "the task type (string): MANUAL_TASK",
  "name": "the task technical name (string)",
  "displayName": "the human readable task name (string)",
  "description": "the task description (string)",
  "displayDescription": "the human readable task description (string)",
  "state": "the current state of the task (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current task",

  "processId": "the process definition id (long) of the case which define this task",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this task. The task has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the task in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this task, null otherwise",
  "assigned_id": "the user id (long) that this task is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current task was assigned, for example '2014-10-17 16:05:42.626'"
}

Methods

The methods used for this resource are:

  • POST - Add a new subtask

  • GET - Read or search a subtask

  • PUT - Execute the subtask

Add a new subtask

Use a POST method to create a new subtask. A subtask is attached to a parent task and it needs to be immediately assigned to a user.

Example:

  • URL
    /API/bpm/manualTask

  • Method
    POST

  • Request Payload
    Example: Add a new subtask to the parent task with id 1. The subtask has displayName "My subtask" , is assigned to user 1, and contains other important information.

    {
      "parentTaskId":"40001",
      "state":"ready",
      "name":"My subtask",
      "description":"This is my subtask",
      "priority":"above_normal",
      "dueDate":"2014-12-25 00:00:00.000",
      "assigned_id":"1"
    }
  • Success Response

    • Code: 200

    • Payload:

      {
        "displayDescription":"This is my subtask",
        "executedBySubstitute":"1",
        "processId":"8367255255370237633",
        "parentCaseId":"1",
        "state":"ready",
        "rootContainerId":"1",
        "type":"MANUAL_TASK",
        "assigned_id":"1",
        "assigned_date":"2014-12-01 17:39:53.784",
        "id":"40006",
        "executedBy":"1",
        "caseId":"1",
        "priority":"above_normal",
        "actorId":"1",
        "description":"This is my subtask",
        "name":"My subtask",
        "reached_state_date":"2014-12-01 17:39:53.784",
        "rootCaseId":"1",
        "displayName":"My subtask",
        "parentTaskId":"40001",
        "dueDate":"2014-12-25 00:00:00.000",
        "last_update_date":"2014-12-01 17:39:53.784"
      }

Execute a subtask

Use a PUT method to execute a subtask. Executing a subtask basically means changing its state to completed and providing an executedBy value.

  • URL
    /API/bpm/manualTask/:manualTaskId

  • Method
    PUT

  • Request Payload

    {
      "state":"completed",
      "executedBy":"1"
    }
  • Success Response

    • Code: 200

Retrieve a subtask

Use a GET method to retrieve information about a subtask.

  • URL
    /API/bpm/manualTask/:manualTaskId

  • Method
    GET

  • Success Response

    • Code: 200

Search subtasks

Use a GET method with filters and search terms to search for subtasks.

  • URL
    /API/bpm/manualTask

  • Method
    GET

  • Data Params
    Standard search parameters are available.
    You can filter on:

    • assigned_id={user_id}: retrieve only the manual tasks assigned to the specified user. For example, retrieve the manual tasks assigned to user with id 1: /API/bpm/manualTask?p=0&c=10&f=assigned_id%3d1.

    • state=skipped | ready | completed | failed : retrieve only the manual tasks with the specified state. For example, retrieve the ready tasks: /API/bpm/manualTask?p=0&c=10&f=state%3dready.

    • caseId={case_id}: retrieve only the manual tasks created in the specified case. For example, retrieve the manual tasks for the case_id 2: /API/bpm/manualTask?p=0&c=10&f=caseId%3d2.

    • parentTaskId={parentTask_id}: retrieve only the manual tasks for a specific parentTask. For example, retrieve the manual tasks for the parentTask_id 40001: /API/bpm/manualTask?p=0&c=10&f=parentTaskId%3d40001.

    You can search on:

    • name: search all manual tasks with a name that starts with the search string. For example, search for all manual tasks that have a name that starts with MySubTask: /API/bpm/manualTask?p=0&c=10&s=MySubTask.

  • Success Response
    An array of manualTask objects

    • Code: 200

Task

Description

Manage process tasks

Identifier

The ID of the task (a long value).

Representation

{
  "id": "the task id (long)",
  "type": "the task type (string)",
  "name": "the task technical name (string)",
  "displayName": "the human readable task name (string)",
  "description": "the task description (string)",
  "displayDescription": "the human readable task description (string)",
  "state": "the current state of the task (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current task",

  "processId": "the process definition id (long) of the case which define this task",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this task. The task has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the task in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this task, null otherwise",
  "assigned_id": "the user id (long) that this task is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current task was assigned, for example '2014-10-17 16:05:42.626'"
}

Methods

The methods used for this resource are:

  • GET - Read a resource or search for a resource

  • PUT - Update a resource

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId: the id of the process that is associated with the activity

  • caseId: the id of the case that is associated with the activity

  • rootCaseId: the root case that is associated with this activity’s case

  • parentCaseId: the parent case that is associated with this activity’s case

  • rootContainerId: the root process of the root case that is associated with this activity

  • executedBy: the user who executed the activity

  • executedBySubstitute: the user who executed the activity for the executedBy user (only in Effeciency, Performance and Enterprise editions)

  • actorId: the actor that can execute this activity

  • assigned_id: the user this activity is assigned to

  • parentTaskId: in the case of a subtask, the parent task

Read a task

  • URL
    /API/bpm/task/:taskId

  • Method
    GET

  • Success Response

    • Code: 200

    • Payload:
      JSON representation of a task

      {
        "displayDescription":"",
        "executedBySubstitute":"0",
        "processId":"9132099022957910959",
        "parentCaseId":"5",
        "state":"ready",
        "rootContainerId":"5",
        "type":"USER_TASK",
        "assigned_id":"4",
        "assigned_date":"2014-12-01 16:22:54.685",
        "id":"10",
        "executedBy":"0",
        "caseId":"5",
        "priority":"normal",
        "actorId":"6",
        "description":"",
        "name":"Step1",
        "reached_state_date":"2014-12-01 16:22:50.814",
        "rootCaseId":"5",
        "displayName":"Step1",
        "dueDate":"2014-12-01 17:22:50.809",
        "last_update_date":"2014-12-01 16:22:50.814"
      }

      ==== Update a task

  • URL
    /API/bpm/task/:taskId

  • Method
    PUT

  • Request Payload
    Task fields to update (forbidden fields are : caseId, processId, name, executedBy, type, id, reached_state_date, last_update_date)

    { "state": "completed" }
  • Success Response

    • Code: 200

Search tasks

  • URL
    /API/bpm/task
    Example: Get ten first tasks for process id 8410739 order by state /API/bpm/task?c=10&p=0&f=processId=8410739119827826184&o=state

  • Method
    GET

  • Data Params

    • Accepted sort values (o={value}) : caseId, processId, state, type, supervisor_id, last_update_date

    • Accepted filters (f={filter}=value) : caseId, processId, state, type, supervisor_id, last_update_date

    • d: extend resource response parameters of this resource are available.

  • Success Response

    • Code: 200

    • Payload:
      JSON representation of an array of tasks

      [
        {
          "displayDescription":"",
          "executedBySubstitute":"0",
          "processId":"8410739119827826184",
          "parentCaseId":"9",
          "state":"ready",
          "rootContainerId":"9",
          "type":"USER_TASK",
          "assigned_id":"",
          "assigned_date":"",
          "id":"18",
          "executedBy":"0",
          "caseId":"9",
          "priority":"normal",
          "actorId":"7",
          "description":"",
          "name":"Step1",
          "reached_state_date":"2014-12-01 16:48:31.189",
          "rootCaseId":"9",
          "displayName":"Step1",
          "dueDate":"2014-12-01 17:48:31.185",
          "last_update_date":"2014-12-01 16:48:31.189"
        }, {
          "displayDescription":"",
          "executedBySubstitute":"0",
          "processId":"8410739119827826184",
          "parentCaseId":"10",
          "state":"ready",
          "rootContainerId":"10",
          "type":"USER_TASK",
          "assigned_id":"",
          "assigned_date":"",
          "id":"20",
          "executedBy":"0",
          "caseId":"10",
          "priority":"normal",
          "actorId":"7",
          "description":"",
          "name":"Step1",
          "reached_state_date":"2014-12-01 16:48:37.666",
          "rootCaseId":"10",
          "displayName":"Step1",
          "dueDate":"2014-12-01 17:48:37.662",
          "last_update_date":"2014-12-01 16:48:37.666"
        }
      ]

UserTask

Description

An executable task that is performed by a user.

Identifier

Simple, the ID of the object (a long value)

Representation

{
  "id": "the task id (long)",
  "type": "the task type (string): USER_TASK",
  "name": "the task technical name (string)",
  "displayName": "the human readable task name (string)",
  "description": "the task description (string)",
  "displayDescription": "the human readable task description (string)",
  "state": "the current state of the task (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current task",

  "processId": "the process definition id (long) of the case which define this task",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this task. The task has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the task in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this task, null otherwise",
  "assigned_id": "the user id (long) that this task is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current task was assigned, for example '2014-10-17 16:05:42.626'"
}

Methods

The methods used for this resource are:

  • GET - Retrieve a userTask, search for userTask objects

  • POST - Execute a task with contract

  • PUT - Update a userTask

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId: the id of the process that is associated with the activity

  • caseId: the id of the case that is associated with the activity

  • rootCaseId: the root case that is associated with this activity’s case

  • parentCaseId: the parent case that is associated with this activity’s case

  • rootContainerId: the root process of the root case that is associated with this activity

  • executedBy: the user who executed the activity

  • executedBySubstitute: the user who executed the activity for the executedBy user (only in Effeciency, Performance and Enterprise editions)

  • actorId: the actor that can execute this activity

  • assigned_id: the user this activity is assigned to

  • parentTaskId: in the case of a subtask, the parent task

Actions

Retrieve a userTask
  • URL
    /API/bpm/userTask/:userTaskId

  • Method
    GET

  • Success Response
    A userTask object

    • Code: 200

    • Payload:

      {
        "displayDescription":"",
        "executedBySubstitute":"0",
        "processId":"5826139717723008213",
        "state":"ready",
        "rootContainerId":"1002",
        "type":"USER_TASK",
        "assigned_id":"",
        "assigned_date":"",
        "id":"20004",
        "executedBy":"0",
        "caseId":"1002",
        "priority":"normal",
        "actorId":"102",
        "description":"",
        "name":"Analyse case",
        "reached_state_date":"2014-09-05 11:11:30.808",
        "displayName":"Analyse case",
        "dueDate":"2014-09-05 12:11:30.775",
        "last_update_date":"2014-09-05 11:11:30.808"
      }
Update a userTask

Fields that can be updated are assignedId and state. The only value that can be set for the state is "skipped". You only need to specify the fields that are to be updated.

  • URL
    /API/bpm/userTask/:userTaskId

  • Method
    PUT

  • Request Payload

    {
      "assigned_id" : "id of new user",
      "state":"skipped"
    }
  • Success Response

    • Code: 200

Retrieve the task contract

Task contract elements can be retrived client side.

  • URL
    /API/bpm/userTask/:userTaskId/contract

  • Method
    GET

  • Success Response

    • Code: 200

    • Payload:

      {
        "constraints":[
          {
            "name":"ticket_comment",
            "expression":"ticket_comment!=null && !ticket_comment.toString().isEmpty()",
            "explanation":"input ticket_comment is mandatory",
            "inputNames":[
              "ticket_comment"
              ],
            "constraintType":"MANDATORY"
          }
        ],
        "inputs":[
          {
             "description":null,
             "name":"ticket_comment",
             "multiple":false,
             "type":"TEXT"
             "inputs":[]
          }
        ]
      }
Execute a task with contract

In order to execute a task, the task contract values have to be provided.

  • URL
    /API/bpm/userTask/:userTaskId/execution

  • Method
    POST

  • Request Payload
    A JSON object matching task contract. Execute a task providing correct contract values.

    {
      "ticket_comment":"This is a comment"
    }
  • Optional URL Parameter
    assign=true, assign the task to the current user and execute the task.

  • Success Response

    • Code: 204

  • Error Response

    • Code: 400 contract violation explanation

    • Response Payload

      {
        "exception":"class org.bonitasoft.engine.bpm.contract.ContractViolationException",
        "message":"USERNAME=walter.bates | Contract is not valid: ",
        "explanations":[
          "Expected input [ticket_comment] is missing"
        ]
      }
Retrieve the userTask context
  • URL
    /API/bpm/userTask/:userTaskId/context

  • Method
    GET

  • Success Response
    A context object

    • Code: 200

    • Payload:

      {
        "myBusinessData_ref":{
          "name":"myBusinessData",
          "type":"com.company.model.BusinessObject1",
          "link":"API/bdm/businessData/com.company.model.BusinessObject1/2",
          "storageId":2,
          "storageId_string":"2"
        },
        "myDocument_ref":{
          "id":1,
          "processInstanceId":3,
          "name":"myDocument",
          "author":104,
          "creationDate":1434723950847,
          "fileName":"TestCommunity-1.0.bos",
          "contentMimeType":null,
          "contentStorageId":"1",
          "url":"documentDownload?fileName=TestCommunity-1.0.bos&contentStorageId=1",
          "description":"",
          "version":"1",
          "index":-1,
          "contentFileName":"TestCommunity-1.0.bos"
        }
      }

ArchivedHumanTask

Description

An Archived Human task is a User task or Manual task that has been archived.

Identifier

Simple, the ID of the object (a long value)

Representation

{
  "id": "the activity id (long)",
  "type": "the activity type (string): USER_TASK | MANUAL_TASK",
  "name": "the activity technical name (string)",
  "displayName": "the human readable activity name (string)",
  "description": "the activity description (string)",
  "displayDescription": "the human readable activity description (string)",
  "state": "the current state of the activity (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this activity reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this activity was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this activity is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current activity",
  "sourceObjectId":"id (long) of the original humanTask before archiving",
  "archivedDate": "the date (('yyyy-MM-dd HH:mm:ss.SSS')) when this humanTask was archived, for example '2014-10-17 16:05:42.626'",

  "processId": "the process definition id (long) of the case which define this activity",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this activity. The activity has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the activity in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this activity, null otherwise",
  "assigned_id": "the user id (long) that this activity is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current activity was assigned, for example '2014-10-17 16:05:42.626'"
}

Methods

The methods used for this resource are:

  • GET - Read a resource

Actions

Retrieve an archivedHumanTask
  • URL
    /API/bpm/archivedHumanTask/:archivedHumanTaskId

  • Method
    GET

  • Success Response
    The JSON representation of an archivedHumanTask

    • Code: 200

    • Payload:

      {
        "displayDescription":"",
        "executedBySubstitute":"0",
        "processId":"5826139717723008213",
        "state":"skipped",
        "rootContainerId":"1002",
        "type":"USER_TASK",
        "assigned_id":"2",
        "id":"240002",
        "executedBy":"0",
        "sourceObjectId":"20004",
        "caseId":"1002",
        "priority":"normal",
        "actorId":"102",
        "description":"",
        "name":"Analyse case",
        "reached_state_date":"2014-09-09 17:21:51.946",
        "displayName":"Analyse case",
        "archivedDate":"2014-09-09 17:21:51.986",
        "dueDate":"2014-09-05 12:11:30.775",
        "last_update_date":"2014-09-09 17:21:51.946"
      }

      ===== Search for a archivedHumanTask

Retrieve archivedHumanTask objects that match the specified filters.

  • URL
    /API/bpm/archivedHumanTask
    Example: Get the human tasks assigned to the user with id 2. /API/bpm/archivedHumanTask?p=0&c=10&f=assigned_id%3d2

  • Method
    GET

  • Data Params
    Standard search parameters are available.
    You can filter on:

    • assigned_id={user_id}: retrieve only the human tasks assigned to the specified ID. For example, retrieve the human tasks assigned to user with id 2: /API/bpm/archivedHumanTask?p=0&c=10&f=assigned_id%3d2

    • state=: retrieve only the archived user tasks with the specified state. For example, retrieve the skipped tasks: /API/bpm/archivedHumanTask?p=0&c=10&f=state=skipped

    • name=: retrieve only the human tasks with the specified name. For example, retrieve the human tasks with the name "Analyse Case": /API/bpm/archivedHumanTask?p=0&c=10&f=name=Analyse Case

    • displayName=: retrieve only the archived user tasks with the specified displayName. For example, retrieve the human tasks with the displayName "Analyse Case": /API/bpm/archivedHumanTask?p=0&c=10&f=displayName=Analyse Case

  • Success Response
    An array of archivedHumanTask objects in JSON

    • Code: 200

    • Payload:

      [
        {
          "displayDescription":"Case analysis",
          "executedBySubstitute":"0",
          "processId":"5826139717723008213",
          "state":"failed",
          "rootContainerId":"1002",
          "type":"USER_TASK",
          "assigned_id":"2",
          "assigned_date":"2014-09-05 09:19:30.150",
          "id":"20004",
          "executedBy":"0",
          "caseId":"1002",
          "priority":"normal",
          "actorId":"102",
          "description":"",
          "name":"Analyse case",
          "reached_state_date":"2014-09-05 11:11:30.808",
          "displayName":"Analyse case",
          "dueDate":"2014-09-05 12:11:30.775",
          "last_update_date":"2014-09-05 11:11:30.808"
        },
        {
          "displayDescription":"Validate case",
          "executedBySubstitute":"0",
          "processId":"5826139717723007999",
          "state":"skipped",
          "rootContainerId":"1010",
          "type":"USER_TASK",
          "assigned_id":"2",
          "assigned_date":"2014-09-06 10:29:30.766",
          "id":"20004",
          "executedBy":"0",
          "caseId":"1023",
          "priority":"normal",
          "actorId":"102",
          "description":"",
          "name":"Validate case",
          "reached_state_date":"2014-09-06 12:10:50.744",
          "displayName":"Validate case",
          "dueDate":"2014-09-06 12:11:30.775",
          "last_update_date":"2014-09-06 12:10:50.744"
        }
      ]

ArchivedManualTask

Description

Use the archivedManualTask resource to access archived process subtasks.

Identifier

Simple, the ID of the object (a long value)

Representation

{
  "id": "the archived manual task id (long)",
  "type": "the archived manual task type (string): MANUAL_TASK",
  "name": "the archived manual task technical name (string)",
  "displayName": "the human readable archived manual task name (string)",
  "description": "the archived manual task description (string)",
  "displayDescription": "the human readable archived manual task description (string)",
  "state": "the current state of the archived manual task (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived manual task reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived manual task was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived manual task is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current archived manual task",
  "sourceObjectId":"id (long) of the original manualTask before archiving",
  "archivedDate": "the date (('yyyy-MM-dd HH:mm:ss.SSS')) when this subtask was archived, for example '2014-10-17 16:05:42.626'",

  "processId": "the process definition id (long) of the case which define this archived manual task",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this archived manual task. The archived manual task has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the archived manual task in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this archived manual task, null otherwise",
  "assigned_id": "the user id (long) that this archived manual task is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current archived manual task was assigned, for example '2014-10-17 16:05:42.626'"

 }

Methods

The methods used for this resource are:

  • GET - Read or search an archived subtask

Retrieve a subtask

Use a GET method to retrieve information about a subtask.

  • URL
    /API/bpm/archivedManualTask/:archivedHumanTaskId

  • Method
    GET

  • Success Response

    • Code: 200

    • Payload:

      {
        "displayDescription":"this is a test",
        "executedBySubstitute":"1",
        "processId":"8367255255370237633",
        "parentCaseId":"1",
        "state":"completed",
        "rootContainerId":"1",
        "type":"MANUAL_TASK",
        "assigned_id":"1",
        "id":"160007",
        "sourceObjectId":"40003",
        "executedBy":"1",
        "caseId":"1",
        "priority":"highest",
        "actorId":"1",
        "description":"this is a test",
        "name":"myTest",
        "reached_state_date":"2014-12-01 17:20:47.200",
        "rootCaseId":"1",
        "archivedDate":"2014-12-01 17:20:47.217",
        "displayName":"myTest",
        "parentTaskId":"40001",
        "dueDate":"2014-12-17 00:00:00.000",
        "last_update_date":"2014-12-01 17:20:47.200"
      }

Search subtasks

Use a GET method with filters and search terms to search for subtasks.

  • URL
    /API/bpm/archivedManualTask

  • Method
    GET

  • Data Params
    Standard search parameters are available.
    You can filter on:

    • assigned_id={user_id}: retrieve only the manual tasks assigned to the specified user. For example, retrieve the manual tasks assigned to user with id 1: /API/bpm/archivedManualTask?p=0&c=10&f=assigned_id%3d10

    • state=skipped

      completed

      failed : retrieve only the manual tasks with the specified state. For example, retrieve the ready tasks: /API/bpm/archivedManualTask?p=0&c=10&f=state%3dready

    • caseId={case_id}: retrieve only the manual tasks created in the specified case. For example, retrieve the manual tasks for the case_id 2: /API/bpm/archivedManualTask?p=0&c=10&f=caseId%3d2

    • parentTaskId={parentTask_id}: retrieve only the manual tasks for a specific parentTask_id. For example, retrieve the manual tasks for the parentTask_id 40001: /API/bpm/archivedManualTask?p=0&c=10&f=parentTaskId%3d40001

    You can search on:

    • name: search all manual tasks with a name that starts with the search string. For example, search for all manual tasks that have a name that starts with MySubTask: /API/bpm/archivedManualTask?p=0&c=10&s=MySubTask

  • Success Response
    An array of manualTask objects

    • Code: 200

ArchivedTask

Description

Get informations about archived tasks

Identifier

The ID of the archived task (a long value).

Representation

{
  "id": "the archived task id (long)",
  "type": "the archived task type (string)",
  "name": "the archived task technical name (string)",
  "displayName": "the human readable archived task name (string)",
  "description": "the archived task description (string)",
  "displayDescription": "the human readable archived task description (string)",
  "state": "the current state of the archived task (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived task reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived task was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this archived task is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current archived task",
  "sourceObjectId": "the original id of the task before it was archived",
  "archivedDate": "the date (('yyyy-MM-dd HH:mm:ss.SSS')) when this task was archived, for example '2014-10-17 16:05:42.626'",

  "processId": "the process definition id (long) of the case which define this archived task",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this archived task. The archived task has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the archived task in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this archived task, null otherwise",
  "assigned_id": "the user id (long) that this archived task is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current archived task was assigned, for example '2014-10-17 16:05:42.626'"
}

Methods

The methods used for this resource are:

  • GET - Read a resource or search for a resource

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId: the id of the process that is associated with the activity

  • caseId: the id of the case that is associated with the activity

  • rootCaseId: the root case that is associated with this activity’s case

  • parentCaseId: the parent case that is associated with this activity’s case

  • rootContainerId: the root process of the root case that is associated with this activity

  • executedBy: the user who executed the activity

  • executedBySubstitute: the user who executed the activity for the executedBy user (only in Effeciency, Performance and Enterprise editions)

  • actorId: the actor that can execute this activity

  • assigned_id: the user this activity is assigned to

  • parentTaskId: in the case of a subtask, the parent task

Read an archived task

  • URL
    /API/bpm/archivedTask/:taskId

  • Method
    GET

  • Success Response
    JSON representation of an archived task

    • Code: 200

    • Payload:

      {
        "displayDescription":"",
        "executedBySubstitute":"4",
        "processId":"9132099022957910959",
        "parentCaseId":"5",
        "state":"completed",
        "rootContainerId":"5",
        "type":"USER_TASK",
        "assigned_id":"4",
        "id":"9",
        "sourceObjectId":"10",
        "executedBy":"4",
        "caseId":"5",
        "priority":"normal",
        "actorId":"6",
        "description":"",
        "name":"Step1",
        "reached_state_date":"2014-12-01 16:24:32.457",
        "rootCaseId":"5",
        "archivedDate":"2014-12-01 16:24:32.460",
        "displayName":"Step1",
        "dueDate":"2014-12-01 17:22:50.809",
        "last_update_date":"2014-12-01 16:24:32.457"
      }

Search archived tasks

  • URL
    /API/bpm/archivedTask
    Example: Search ten first archived task of process 8410739 order by name: /API/bpm/archivedTask?c=10&p=0&f=processId=8410739119827826184&o=name

  • Method
    GET

  • Data Params
    Standard search parameters are available.

    • Accepted sort values o={value} : caseId, name, displayName, processId, state, type, archivedDate, reached_state_date, assigned_id

    • Accepted filters f={filter}=value : caseId, name, displayName, processId, state, type, archivedDate, reached_state_date, assigned_id, isTerminal

    • d: extend resource response parameters of this resource are available.

  • Success Response
    JSON representation of an array of archived tasks

    • Code: 200

    • Payload:

      [
        {
          "displayDescription":"",
          "executedBySubstitute":"4",
          "processId":"8410739119827826184",
          "parentCaseId":"6",
          "state":"completed",
          "rootContainerId":"6",
          "type":"USER_TASK",
          "assigned_id":"4",
          "id":"12",
          "sourceObjectId":"12",
          "executedBy":"4",
          "caseId":"6",
          "priority":"normal",
          "actorId":"7",
          "description":"",
          "name":"Step1",
          "reached_state_date":"2014-12-01 16:31:46.961",
          "rootCaseId":"6",
          "archivedDate":"2014-12-01 16:31:46.965",
          "displayName":"Step1",
          "dueDate":"2014-12-01 17:31:42.563",
          "last_update_date":"2014-12-01 16:31:46.961"
        },
        {
          "displayDescription":"",
          "executedBySubstitute":"4",
          "processId":"8410739119827826184",
          "parentCaseId":"7",
          "state":"completed",
          "rootContainerId":"7",
          "type":"USER_TASK",
          "assigned_id":"4",
          "id":"15",
          "sourceObjectId":"14",
          "executedBy":"4",
          "caseId":"7",
          "priority":"normal",
          "actorId":"7",
          "description":"",
          "name":"Step1",
          "reached_state_date":"2014-12-01 16:32:13.232",
          "rootCaseId":"7",
          "archivedDate":"2014-12-01 16:32:13.235",
          "displayName":"Step1",
          "dueDate":"2014-12-01 17:32:07.918",
          "last_update_date":"2014-12-01 16:32:13.232"
        }
      ]

ArchivedUserTask

Description

An executable task that has been performed by a user or skipped and is archived.

Identifier

Simple, the ID of the object (a long value)

Representation

{
  "id": "the user task id (long)",
  "type": "the user task type (string): USER_TASK",
  "name": "the user task technical name (string)",
  "displayName": "the human readable user task name (string)",
  "description": "the user task description (string)",
  "displayDescription": "the human readable user task description (string)",
  "state": "the current state of the user task (string, possible values: ready, completed, failed)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this user task reached the current state, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this user task was last updated, for example '2014-10-17 16:05:42.626)",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this user task is due, for example '2014-10-17 16:05:42.626'",
  "priority": "the priority (string) of the current user task",
  "archivedDate":"the date ('yyyy-MM-dd HH:mm:ss.SSS') when this task was archived, for example '2014-10-17 16:05:42.626'",

  "processId": "the process definition id (long) of the case which define this user task",
  "parentCaseId": "the immediate containing case id (long, a.k.a process instance id)",
  "rootCaseId": "the top/root case id (long, a.k.a process instance id). In the case of an event sub process, parentCaseId will the id of the case called while rootCaseId will be the one from the caller case",
  "rootContainerId": "same as rootCaseId",

  "executedBy": "the id (long) of the user who performed this user task. The user task has to be a human task otherwise its value will be 0",
  "executedBySubstitute": "the id (long) of the user who did actually performed the user task in the case of has been done in the name of someone else. Value is 0 otherwise",
  "actorId": "the id (long) of the actor that can execute this user task, null otherwise",
  "assigned_id": "the user id (long) that this user task is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current user task was assigned, for example '2014-10-17 16:05:42.626'"
}

Methods

The methods used for this resource are:

  • GET - Retrieve an archivedUserTask, search for archivedUserTask objects

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId: the id of the process that is associated with the activity

  • caseId: the id of the case that is associated with the activity

  • rootCaseId: the root case that is associated with this activity’s case

  • parentCaseId: the parent case that is associated with this activity’s case

  • rootContainerId: the root process of the root case that is associated with this activity

  • executedBy: the user who executed the activity

  • executedBySubstitute: the user who executed the activity for the executedBy user (only in Effeciency, Performance and Enterprise editions)

  • actorId: the actor that can execute this activity

  • assigned_id: the user this activity is assigned to

  • parentTaskId: in the case of a subtask, the parent task

Actions

Retrieve an archivedUserTask
  • URL
    API/bpm/archivedUserTask/:id

  • Method
    GET

  • Success Response
    An archivedUserTask object

    • Code: 200

    • Payload:

      {
        "displayDescription":"",
        "executedBySubstitute":"0",
        "processId":"5826139717723008213",
        "state":"skipped",
        "rootContainerId":"1002",
        "type":"USER_TASK",
        "assigned_id":"2",
        "id":"240002",
        "executedBy":"0",
        "caseId":"1002",
        "priority":"normal",
        "actorId":"102",
        "description":"",
        "name":"Analyse case",
        "reached_state_date":"2014-09-09 17:21:51.946",
        "displayName":"Analyse case",
        "archivedDate":"2014-09-09 17:21:51.986",
        "dueDate":"2014-09-05 12:11:30.775",
        "last_update_date":"2014-09-09 17:21:51.946"
      }
Search for a archivedUserTask

Retrieve archivedHumanTask objects that match the specified filters.

  • URL
    /API/bpm/archivedUserTask
    Example: Get the user tasks assigned to the user with id 2:/API/bpm/archivedUserTask?p=0&c=10&f=assigned_id%3d2

  • Method
    GET

  • Data Params
    Standard search parameters are available.

    You can filter on:

    • assigned_id={user_id}: retrieve only the user tasks assigned to the specified ID. For example, retrieve the user tasks assigned to user with id 2: /API/bpm/archivedUserTask?p=0&c=10&f=assigned_id%3d2

    • state=: retrieve only the archived user tasks with the specified state. For example, retrieve the skipped tasks: /API/bpm/archivedUserTask?p=0&c=10&f=state=skipped

    • name=: retrieve only the user tasks with the specified name. For example, retrieve the user tasks with the name "Analyse Case": /API/bpm/archivedUserTask?p=0&c=10&f=name=Analyse Case

    • displayName=: retrieve only the archived user tasks with the specified displayName. For example, retrieve the user tasks with the displayName "Analyse Case": /API/bpm/archivedUserTask?p=0&c=10&f=displayName=Analyse Case

    • d: extend resource response parameters of this resource are available.

  • Success Response
    An array of archivedUserTask objects

    • Code: 200

    • Payload:

      [
        {
          "displayDescription":"Case analysis",
          "executedBySubstitute":"0",
          "processId":"5826139717723008213",
          "state":"failed",
          "rootContainerId":"1002",
          "type":"USER_TASK",
          "assigned_id":"2",
          "assigned_date":"2014-09-05 09:19:30.150",
          "id":"20004",
          "executedBy":"0",
          "caseId":"1002",
          "priority":"normal",
          "actorId":"102",
          "description":"",
          "name":"Analyse case",
          "reached_state_date":"2014-09-05 11:11:30.808",
          "displayName":"Analyse case",
          "dueDate":"2014-09-05 12:11:30.775",
          "last_update_date":"2014-09-05 11:11:30.808"
        }, {
          "displayDescription":"Validate case",
          "executedBySubstitute":"0",
          "processId":"5826139717723007999",
          "state":"skipped",
          "rootContainerId":"1010",
          "type":"USER_TASK",
          "assigned_id":"2",
          "assigned_date":"2014-09-06 10:29:30.766",
          "id":"20004",
          "executedBy":"0",
          "caseId":"1023",
          "priority":"normal",
          "actorId":"102",
          "description":"",
          "name":"Validate case",
          "reached_state_date":"2014-09-06 12:10:50.744",
          "displayName":"Validate case",
          "dueDate":"2014-09-06 12:11:30.775",
          "last_update_date":"2014-09-06 12:10:50.744"
        }
      ]

Flow Nodes

Flow Node

Description

A flow node (gateway, event, or task) in an open instance of a process.

Identifier

The ID of the flowNode (a long).

Representation

{
 "id": "the flow node id (long)",
 "displayDescription": "the human readable flow node description (string)",
 "executedBySubstitute": "the id (long) of the user who really performed this flow node in case where a substitute did it, or 0 if the flow node was not performed by a substitute",
 "caseId": "the case id (long) that is associated with this flow node",
 "parentCaseId": "the parent case id (long) that is associated with this flow node's case",
 "rootCaseId": "the root case initiator id (long) that is associated with this flow node's case",
 "processId": "the process id (long) that is associated with this flow node",
 "rootContainerId": "the root process id (long) of the root case that is associated with this flow node",
 "state": "the current state of the flow node (string,  for example, ready, completed, failed)",
 "type": "the flow node type (string)",
 "assigned_id": "the user id (long) that this flow node is assigned to, or 0 if it is unassigned",
 "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current flow node was assigned, for example '2014-10-17 16:05:42.626'",
 "executedBy": "the id (long) of the user who executed the flow node, or 0 if the flow node has not been executed",
 "priority": "the priority (string) of the current flow node",
 "actorId": "the id (long) of the actor that can execute this flow node, null otherwise",
 "description": "the flow node description (string)",
 "name": "the flow node name (string)",
 "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this flow node reached the current state, for example '2014-10-17 16:05:42.626'",
 "displayName": "the display name (string) of this flow node",
 "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this flow node is due, for example '2014-10-17 16:05:42.626'",
 "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this flow node was last updated, for example '2014-10-17 16:05:42.626)",
 "parentTaskId" : "in the case of a subtask, the parent task id (long)"
}

Methods

The methods used for this resource are:

  • GET - Read a flow node or search for a flow node

  • PUT - Replay a flow node (only in Enterprise and Performance editions)

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId: the id of the process that is associated with the activity

  • caseId: the id of the case that is associated with the activity

  • rootCaseId: the root case that is associated with this activity’s case

  • parentCaseId: the parent case that is associated with this activity’s case

  • rootContainerId: the root process of the root case that is associated with this activity

  • executedBy: the user who executed the activity

  • executedBySubstitute: the user who executed the activity for the executedBy user (only in Effeciency, Performance and Enterprise editions)

  • actorId: the actor that can execute this activity

  • assigned_id: the user this activity is assigned to

  • parentTaskId: in the case of a subtask, the parent task

Get a Flow Node

Retrieve the flow node information of the given id.

  • URL
    /API/bpm/flowNode/:id

  • Method
    GET

  • Data Params
    The deploy query parameter can be used.

  • Success Response
    The JSON representation of the specified flownode

    • Code: 200

    • Payload:

      {
        "displayDescription": "",
        "executedBySubstitute": "0",
        "processId": "7596769292810273901",
        "parentCaseId": "1",
        "state": "failed",
        "rootContainerId": "1",
        "type": "USER_TASK",
        "assigned_id": "",
        "assigned_date": "",
        "id": "77456",
        "executedBy": "0",
        "caseId": "1",
        "priority": "normal",
        "actorId": "4",
        "description": "",
        "name": "Step1",
        "reached_state_date": "2014-12-10 08:59:47.884",
        "rootCaseId": "1",
        "displayName": "Step1",
        "dueDate": "2014-12-10 09:59:47.855",
        "last_update_date": "2014-12-10 08:59:47.884"
      }

Search among Flow Nodes

Search for flow nodes using given parameters. Flow nodes in states completed, cancelled, or aborted are not retrieved. The search returns an array of flow nodes.

  • URL
    /API/bpm/flowNode
    Example: Get all the active flow nodes named "Escalate", ordering the results by state: /API/bpm/flowNode/?p=0&c=10&f=name%3dEscalate&o%3dstate

  • Method
    GET

  • Data Params
    Standard search parameters are available.
    The following parameters are available:

    • o:

      • name

      • displayName

      • state

      • processDefinitionId

      • parentProcessInstanceId

      • parentActivityInstanceId (if the retrieved flow nodes are activities, order by parent activity id)

      • rootProcessInstanceId

      • lastUpdateDate

    • s: search on any field that can be used to order results

    • f:

      • name

      • state

      • processId

      • parentCaseId

      • rootCaseId

      • last_update_date

    • d: extend resource response parameters of this resource are available.

  • Success Response
    An array of JSON representations of flow nodes

    • Code: 200

Change a Flow Node state

Replay the flow node. (only in Enterprise and Performance editions)

  • URL
    /API/bpm/flowNode/:id

  • Method
    PUT

  • Request Payload

    {
      "state" : "replay"
    }
  • Success Response

    • Code: 200

ArchivedFlowNode

Description

A flow node (gateway or event or task) in an archived instance of a process.

Identifier

The ID of the flowNode (a long).

Representation

{
  "id": "the flowNode id (long)",
  "sourceObjectId": "the original id of the flowNode before it was archived",
  "displayDescription": "the human readable flowNode description (string)",
  "executedBySubstitute": "the id (long) of the user who really performed this flowNode in case where a substitute did it, or 0 if the flowNode was not performed by a substitute",
  "caseId": "the case id (long) that is associated with this flowNode",
  "parentCaseId": "the parent case id (long) that is associated with this flowNode's case",
  "rootCaseId": "the root case initiator id (long) that is associated with this flowNode's case",
  "processId": "the process id (long) that is associated with this flowNode",
  "rootContainerId": "the root process id (long) of the root case that is associated with this flowNode",
  "state": "the current state of the flowNode (string,  for example, ready, completed, failed)",
  "type": "the flowNode type (string)",
  "assigned_id": "the user id (long) that this flowNode is assigned to, or 0 if it is unassigned",
  "assigned_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when the current flowNode was assigned, for example '2014-10-17 16:05:42.626'",
  "executedBy": "the id (long) of the user who executed the flowNode, or 0 if the flowNode has not been executed",
  "priority": "the priority (string) of the current flowNode",
  "actorId": "the id (long) of the actor that can execute this flowNode, null otherwise",
  "description": "the flowNode description (string)",
  "name": "the flowNode name (string)",
  "reached_state_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this flowNode reached the current state, for example '2014-10-17 16:05:42.626'",
  "displayName": "the display name (string) of this flowNode",
  "dueDate": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this flowNode is due, for example '2014-10-17 16:05:42.626'",
  "archivedDate": "the date (('yyyy-MM-dd HH:mm:ss.SSS')) when this flowNode was archived, for example '2014-10-17 16:05:42.626'",
  "last_update_date": "the date ('yyyy-MM-dd HH:mm:ss.SSS') when this flowNode was last updated, for example '2014-10-17 16:05:42.626)",
  "parentTaskId": "in the case of a subtask, the parent task id (long)"
}

Methods

The methods used for this resource are:

  • GET - Read a flow node or search for a flow node

Response object extension (deploy query parameter)

The d (deploy) used to extend response object can be used with :

  • processId: the id of the process that is associated with the activity

  • caseId: the id of the case that is associated with the activity

  • rootCaseId: the root case that is associated with this activity’s case

  • parentCaseId: the parent case that is associated with this activity’s case

  • rootContainerId: the root process of the root case that is associated with this activity

  • executedBy: the user who executed the activity

  • executedBySubstitute: the user who executed the activity for the executedBy user (only in Effeciency, Performance and Enterprise editions)

  • actorId: the actor that can execute this activity

  • assigned_id: the user this activity is assigned to

  • parentTaskId: in the case of a subtask, the parent task

Get a Flow Node

Retrieve the flow node information of the given id.

  • URL
    /API/bpm/archivedFlowNode/:id

  • Method
    GET

  • Success Response
    The JSON representation of the specified flownode

    • Code: 200

Search among flow nodes

Search for flow nodes using given parameters. Flow nodes in state completed, cancelled, aborted are not retrieved. It returns an array of flow nodes.

  • URL
    /API/bpm/archivedFlowNode

  • Method
    GET

  • Data Params
    Standard search parameters are available.
    The following parameters are available:

    • o:

      • name

      • displayName

      • state

      • type

      • isTerminal

      • processId

      • caseId

      • archivedDate

    • s: search on any field that can be used to order results

    • f:

      • name

      • displayName

      • state

      • stateId

      • kind

      • terminal

      • processDefinitionId

      • parentProcessInstanceId

      • rootProcessInstanceId

      • parentActivityInstanceId

      • archivedDate

      • reachedStateDate

      • sourceObjectId

    • d: extend resource response parameters of this resource are available.

  • Success Response
    The JSON representation of the specified flownode

    • Code: 200

TimerEventTrigger

Description

Use this resource to search for BPM timer event triggers. The result enables you to to update the date and time at which the trigger should next execute.

Identifier

The ID of the timer event trigger (a long value), retrieved through search (GET method).

Representation

{
  "id": "the ID of the timer returned",
  "id_string": "number" (since 7.0.1)_,
  "eventInstanceId": "the ID of the event instance to which this trigger is related",
  "eventInstanceId_string": "number" (since 7.0.1),
  "executionDate": "the long value of the next execution date (number of milliseconds from January 1st, 1970 00:00:00)",
  "eventInstanceName": "the name of the event instance to which this trigger is related"
}

The string representation added in 7.0.1 for Long attributes is a workaround for the JavaScript integer spectrum issue.

Methods

The methods used for this resource are:

  • GET - Search for timer event triggers related to a case, with optional search options

  • PUT - Update a timer event trigger next execution date

Search for BPM timer event triggers.

  • URL
    /API/bpm/timerEventTrigger
    Example: /API/bpm/timerEventTrigger?caseId=4025&p=0&c=10&

  • Method
    GET

  • Data Params

    • caseId: ID of the case (Process instance)

  • Success Response
    A JSON representation of a list of timer event triggers, as described above

    • Code: 200

    • Payload:

      [
        {
          "id":4015,
          "id_string":"4015",
          "eventInstanceId":2,
          "eventInstanceId_string":"2",
          "executionDate":1413980484194,
          "eventInstanceName":"Minuterie1"
        }
      ]

Update a timer event trigger next execution date

Specify the next execution date of a timer event trigger.

  • URL
    /API/bpm/timerEventTrigger/:timerEventTriggerID

  • Method
    PUT

  • Request Payload
    A JSON representation of a long value with attribute name "executionDate"

    {
      "executionDate": 1433980484194
    }
  • Success Response
    The actual long value corresponding to the next execution date of the timer event trigger, as a long value

    • Code: 200

    • Payload:

      {
          "executionDate": 1433980484194
      }

      === Message

Description

Use this resource to send BPM message events. Message events are caught by processes using catch message event flow nodes (Start, intermediate, boundary or receive tasks).

Methods

The methods used for this resource is:

  • POST - Send a message

Send a message event

  • Header
    Content-Type : application/json

  • URL
    /API/bpm/message

  • Method
    POST

  • Request Payload

    {
      "messageName" : "myMessage" ,
      "targetProcess": "processName",
      "targetFlowNode": "catchMessageFlowNodeName", //Optional
      "messageContent" : {
          "data1" : {
              "value" : "aValue" //Cannot be null
           },
          "data2" : {
              "value" : 42, //Cannot be null or empty
              "type" : "java.lang.Long" //Optional
          },
          ...
      },
      "correlations" : {
          "key1" : {
              "value" : "aValue" //Cannot be null
          },
          "key2" : {
              "value" : 123, //Cannot be null or empty
              "type" : "java.lang.Integer" //Optional
          },
          ... // 5 keys max
      }
    }

    Supported value types in message content and correlations :

    • java.lang.String

    • java.lang.Boolean

    • java.lang.Integer

    • java.lang.Double

    • java.lang.Float

    • java.lang.Long

    • java.util.Date (Supports ISO-8601 format, eg: 2013-01-02T02:42:12.17+02:00)

    • java.time.LocalDate (Supports ISO-8601 format, eg: 2018-02-04)

    • java.time.LocalDateTime (Supports ISO-8601 format, eg: 2018-02-04T10:30:15)

    • java.time.OffsetDateTime (Supports ISO-8601 format, eg: 2018-02-04T10:30:15+01:00)
      When not set, the type is guessed using the value. Be careful as it can lead to type inconsistency in the target process (eg: a java.lang.Long is expected and the guessed type is a java.lang.Integer)

  • Success Response

    • Code: 204