[GET] /processes

[GET] /processes

/api/bpm/processes

Description

To retrieve running, suspended, completed or aborted processes for a provided process definition id, a provided user or a provided role. Optionally, an organization id could be sent, if processes for a non-active organization should be retrieved. By default, the active organization will be used.

If the isCompleted parameter is set to false, running, active or suspended processes are returned; if set to true, completed or aborted processes are returned. If the parameter is not provided (null), processes associated with a given process definition id are returned, depending on whether the definition is active or historical. Next to a process definition id, active processes can also be fetched for a specific user or role by providing the parameter userId or roleId in the request.

When the query parameter locked=true is sent, a list of locked workflow processes is returned. Locked workflow processes aren't continuing due to e.g. scripting issues or other problems.

When the query parameter interrupted=true is sent, a list of interrupted workflow processes is returned.

For historical and active processes, fetched by a process definition id, paging can be applied with the parameters sortBy, sort, size, lastProcessId, states and nameLike. Paging is not supported for processes for a certain user or role, locked or interrupted processes.

The state property has the following values:

enaio server number

BPM state constant

0

neutral

1

initialized

2

running

3

 

4

suspended

8

active

5, 16

cancelled

6, 32

finished

7, 64

error

Required Systemrole

R_WFADM_START (ID = 20)

Request
Method

GET

Request Mandatory Query Parameters

One and only one of the following query parameters must be set for a request:

  • processDefinitionId (String): To fetch active or historical processes for a specific process definition.

  • userId (String): To fetch the active processes for a specific user.

  • roleId (String): To fetch the active processes for a specific role.

  • locked (boolean): To fetch the locked processes. Default: false.

  • interrupted (boolean): To fetch the interrupted processes. Default: false.

Request Optional Query Parameters

The following query paramter is optional but can be applied to all of the above mentioned mandatory query parameters:

  • organizationId (String): The id of the organization where the forwarded process definition is located

The following query parameters are optional but can only be applied in combination to the mandatory query parameter processDefinitionId:

  • isCompleted (Boolean): The parameter specifies whether to return active processes (false), historical processes (true). If it is not provided, the BPM service tries to detect by the given processDefinitionId if it is an active or a historical one. The identification will make the response take more time.

  • Paging and sorting query parameters:

    • sortBy (String): By which attribute should be sorted. Available values are: name, startTime and endTime. Default is startTime.

    • sort (String): The sort direction. Available values are: ASC and DESC identically in SQL.

    • size (Integer): The amount of processes which should be returned. If value = zero or if this query parameter is not set, all processes will be returned.

    • lastProcessId (String): For paging the last process Id, which was returned from the last paged result. After this process Id it will then be continued.

    • lastFetchedSortByValue (String): The value of the sortBy column from the last fetched process and lastProcessId. If the process identified by lastProcessId no longer exists, pagination continues based on this value. Please note: If the lastProcessId is no longer existing, enaio server returns results starting with this value because it is not unique. A client must be prepared to filter already existing hitlist results out which it gets again from this endpoint on paging.

    • states (String): A comma separated list of states, the processes must currently have in case to be returned.

    • nameLike (String): A free text string to filter the processes for.

Response
Format

JSON

Minimum Version

1.0.0

Request
Example

/api/bpm/processes?processDefinitionId=20852BCD50D0400AA907E420E5E9C18C

/api/bpm/processes?processDefinitionId=20852BCD50D0400AA907E420E5E9C18C&isCompleted=false
/api/bpm/processes?processDefinitionId=3FC25E4A11674367861FD5BB99DBCF01&isCompleted=true

/api/bpm/processes?processDefinitionId=20852BCD50D0400AA907E420E5E9C18C&isCompleted=false&organizationId=8C2CC574556E40298E636278ECA20D7E
/api/bpm/processes?processDefinitionId=3FC25E4A11674367861FD5BB99DBCF01&isCompleted=true&organizationId=8C2CC574556E40298E636278ECA20D7E

/api/bpm/processes?userId=90772ACD43D0400AA911E430E9E9C22A
/api/bpm/processes?roleId=80652DCD67D0400AA912F420E0E9C09E

/api/bpm/processes?locked=true

/api/bpm/processes?interrupted=true

Result
Example when active processes are returned

{ "objects": [{ "id": "E0E8AF5991A5401E81DA65AD43D1AC24", "name": "Standard-Ad-hoc-Workflow 89", "startTime": "2022-05-13T09:27:05", "startUserId": "E68A04C8054C4BEA9990995A4D629C7F", "startUserName": "ROOT", "processSubject": "mj1234", "state": "active", "lastTask": { "id": "908F03A5BA4646858D161C4160141108", "name": "Initialisierung", "endTime": "2022-05-13T09:28:18" } },{ "id": "74472B0A1F224257B318801CBAD57392", "name": "Standard-Ad-hoc-Workflow 2", "startTime": "2022-11-24T11:28:06", "startUserId": "B1B5246AA8D64B3D815B68E95AB10E9C", "startUserName": "SCHMEISSEL", "processSubject": "asdf", "state": "active", "lastTask": { "id": "00000000000000000000000000000000", "name": "StartActivity", "endTime": "2022-11-24T11:28:07" } }], "numItems": 2, "hasMoreItems": false, "totalNumItems": 2 }

Result
Example when historical processes are returned

{ "objects": [{ "id": "3269AAB2CD0F4EB3BAB2C770CA0EC19C", "name": "SanityTest v.4.1 46", "startTime": "2022-06-28T13:11:10+02:00", "startUserName": "SCHMEISSEL", "endTime": "2022-06-28T13:16:38+02:00", "processSubject": "Pflichtfeld Wert: Vorbelegung", "state": "finished" },{ "id": "32B4238B65234177B9DE1743E5D47B7A", "name": "SanityTest v.4.1 42", "startTime": "2022-05-27T12:33:28+02:00", "startUserName": "SCHMITTBERGER", "endTime": "2024-11-12T14:35:46+01:00", "processSubject": "Pflichtfeld Wert: Vorbelegung", "state": "cancelled" }], "numItems": 2, "hasMoreItems": false, "totalNumItems": 2 }

Result Example for userId or roleId processes fetching

{ "objects": [{ "id": "0C246A434D5B44FCB21294BA17BF9F87", "name": "DB-9304 8", "startTime": "2025-07-02T11:30:53+02:00", "startUserId": "E68A04C8054C4BEA9990995A4D629C7F", "startUserName": "ROOT", "processSubject": "", "state": "active", "activeTask": { "id": "50BE114448CC460EB3454988630F51BA", "name": "Aktivität", "state": "personalized", "createTime": "2025-07-02T11:30:54+02:00", "claimTime": "2025-07-08T18:56:36+02:00", "owner": "user10" } },{ "id": "9C6344E4CAFE40A49729C89C1731BB7F", "name": "Standard-Ad-hoc-Workflow 8", "startTime": "2025-02-03T14:09:02+01:00", "startUserId": "E68A04C8054C4BEA9990995A4D629C7F", "startUserName": "ROOT", "processSubject": "My nice adhoc", "state": "active", "activeTask": { "id": "6BFA52A12BF24BCEA30C49194336CB6A", "name": "Poll-1", "state": "personalized", "createTime": "2025-04-14T11:38:20+02:00", "reminderTime": "2025-04-16T11:35:22+02:00", "owner": "user10" } }], "numItems": 2, "hasMoreItems": false, "totalNumItems": 2 }

Result Example when locked processes are returned

{ "objects": [ { "id": "7615794F24D2450F94A2DA560CE545CA", "name": "lockedProcesses 22", "server": "WF-System3", "threadId": "12048", "lockTime": "2025-10-10T15:03:47+02:00" } ], "numItems": 1, "hasMoreItems": false, "totalNumItems": 1 }

Result Example when interrupted processes are returned

{ "objects": [{ "id": "022B04F250CE424B98B7572B5F7F8D71", "name": "lockedProcesses 85", "startTime": "2025-10-29T11:18:40+01:00", "startUserId": "E68A04C8054C4BEA9990995A4D629C7F", "startUserName": "ROOT", "processSubject": "", "state": "error", "lastTask": { "id": "00000000000000000000000000000000", "name": "StartActivity", "endTime": "2025-10-29T11:18:41+01:00" } }, { "id": "022BF0F8057A4CAEA148955D73EB1E4E", "name": "lockedProcesses 42", "startTime": "2025-10-23T16:41:53+02:00", "startUserId": "E68A04C8054C4BEA9990995A4D629C7F", "startUserName": "ROOT", "processSubject": "", "state": "error", "lastTask": { "id": "00000000000000000000000000000000", "name": "StartActivity", "endTime": "2025-10-23T16:41:54+02:00" } } ], "numItems": 1, "hasMoreItems": false, "totalNumItems": 1 }