[GET] /process-definition

[GET] /process-definition

/api/bpm/processes/{id}/process-definition

Description

To retrieve workflow model data for rendering the process graph in the enaio administrator-for-workflow UI. Currently, it returns only the basic information necessary for rendering the workflow graph. It provides data derived from the process definition of the specified process, including the process id and name, a list of tasks, and a list of transitions between those tasks. For each task, the response includes its id, name, type, and position on the graph. For each transition, it includes the transition id, the source (fromTaskId) and target (toTaskId) task ids, a flag indicating whether the transition represents a loop, and a list of vertices used to draw the transition path visually.

The type property for each task has the following values according to enaio server manual(Job: wfm.GetWorkflow):

Server Type Number

Return-Constant

0

UndefinedTask

1

StartTask

2

EndTask

3

UserTask

4

MultiInstanceTask

Job returns 3, but additional logic is applied to determine if the task is AdHoc, LoopTask or RouteTask based on XML content.

AdHoc

LoopTask

RouteTask

Required Systemrole

R_WFADM_START (ID = 20)

Request
Method

GET

Request Query Parameter

  • organizationId (String): id of the organization to which the process belongs. If not sent, the active organization id is used.

Response
Format

JSON

Minimum Version

1.0.0

Request
Example

/api/bpm/processes/F9AE4EF484AA445CB7100804CCC0F319/process-definition

/api/bpm/processes/F9AE4EF484AA445CB7100804CCC0F319/process-definition?organizationId=591BCFA1162F4DC9893C1197E89A9A63

Result
Example

{ "id": "5FE2BE3CB4904AE1A97C54F052598770", "name": "ColumnRequiredTest", "tasks": [ { "id": "00000000000000000000000000000000", "name": "StartActivity", "type": "StartTask", "position": { "x": 230, "y": 0, "width": 144, "height": 51 } }, { "id": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "name": "EndActivity", "type": "EndTask", "position": { "x": 230, "y": 230, "width": 144, "height": 51 } }, { "id": "2AD7F062EDCF4C218476B12B9B0F2779", "name": "Activity", "type": "UserTask", "position": { "x": 230, "y": 115, "width": 144, "height": 54 } } ], "transitions": [ { "id": "00000000000000000000000000000100", "fromTaskId": "00000000000000000000000000000000", "toTaskId": "2AD7F062EDCF4C218476B12B9B0F2779", "loop": false, "vertices": [ { "x": 302, "y": 48 }, { "x": 302, "y": 118 } ] }, { "id": "25DC90412C2C4F6E8AFD641C69DA071D", "fromTaskId": "2AD7F062EDCF4C218476B12B9B0F2779", "toTaskId": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "loop": false, "vertices": [ { "x": 302, "y": 166 }, { "x": 302, "y": 233 } ] } ] }