In BAMOE, Management APIs are provided to interact with business Process Definitions and active Process Instances. These APIs allow to obtain metadata information about Process Definitions, as well as provide management endpoints for active Process Instances.
Process Management API
The kie-addons-quarkus-process-management
is an extension for BAMOE that enables process management features for business workflows in a Quarkus-based microservice architecture.
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-process-management</artifactId>
</dependency>
With the Process Management API endpoints, it’s possible to operate with the following Entities:
-
Processes (GET, POST, DELETE)
-
ProcessInstance (GET)
-
Node (GET, POST, DELETE)
-
ProcessError (GET)
-
WorkItem (GET)
The following sections describe the Process Management API in detail.
/management/processes
Type | GET |
---|---|
Description |
This endpoint returns the list of Process Definition names that are deployed in the runtime. |
Inputs |
|
Output |
A JSON list of Process Definition names that are deployed in the runtime.
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes' \ -H 'accept: */*' |
/management/processes/{processId}
Type | GET |
---|---|
Description |
This endpoint returns the complete process information of the specified processId. |
Inputs |
|
Output |
Process instance is returned with following information
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/{processId}' \ -H 'accept: */*' |
/management/processes/{processId}/instances/{processInstanceId}
Type | DELETE |
---|---|
Description |
It aborts a specific process instance of a given process |
Inputs |
|
Output |
|
Example |
curl -X 'DELETE' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}' \ -H 'accept: */*' |
/management/processes/{processId}/instances/{processInstanceId}/error
Type | GET |
---|---|
Description |
This endpoint returns the error details corresponding to the failed process instance for the given processId |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/error' \ -H 'accept: */*' |
/management/processes/{processId}/instances/{processInstanceId}/migrate
Type | POST |
---|---|
Description |
It migrates the process instance specified by the processID and processInstanceID to the target process and process instance. |
Inputs |
|
Output |
|
Example |
curl -X 'POST' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/migrate' \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d '{ "targetProcessId": "string", "targetProcessVersion": "string" }' |
/management/processes/{processId}/instances/{processInstanceId}/nodeInstances
Type | GET |
---|---|
Description |
This endpoint returns the list of workItems in the specified process instance |
Inputs |
|
Output |
WorkItem:
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/nodeInstances' \ -H 'accept: */*' |
/management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}
Type | POST |
---|---|
Description |
It will re trigger the nodeInstance mentioned in the NodeInstanceId for the specified process & process instance |
Inputs |
|
Output |
|
Example |
curl -X 'POST' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}' \ -H 'accept: */*' \ -d '' |
/management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}
Type | DELETE |
---|---|
Description |
It will cancel the nodeInstance mentioned in the nodeInstanceId of the specified process & process instance |
Inputs |
|
Output |
|
Example |
curl -X 'DELETE' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}' \ -H 'accept: */*' |
/management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}/sla
Type | PATCH |
---|---|
Description |
This endpoint updates the SLA Due Date of the specified node in a process instance |
Inputs |
|
Output |
|
Example |
curl -X 'PATCH' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}/sla' \ -H 'accept: */*' -H 'Content-Type: application/json' -d '{ "expirationTime": "2025-12-31T00:00:00.000Z" }' |
/management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}/timers
Type | GET |
---|---|
Description |
This endpoint returns the list of active timers associated with the given node instance of the defined process instance |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}/timers' \ -H 'accept: */*' |
/management/processes/{processId}/instances/{processInstanceId}/nodes/{nodeId}
Type | POST |
---|---|
Description |
It will trigger the node for the specified nodeId corresponding to the mentioned process and process instance. |
Inputs |
|
Output |
|
Example |
curl -X 'POST' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/nodes/{nodeId}' \ -H 'accept: */*' \ -d '' |
/management/processes/{processId}/instances/{processInstanceId}/retrigger
Type | POST |
---|---|
Description |
It will retrigger instance in error status for the specified process & process instance |
Inputs |
|
Output |
|
Example |
curl -X 'POST' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/retrigger' \ -H 'accept: */*' \ -d '' |
/management/processes/{processId}/instances/{processInstanceId}/skip
Type | POST |
---|---|
Description |
It will skip instance in error status corresponding to the mentioned process and process instance |
Inputs |
|
Output |
|
Example |
curl -X 'POST' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/skip' \ -H 'accept: */*' \ -d '' |
/management/processes/{processId}/instances/{processInstanceId}/sla
Type | PATCH |
---|---|
Description |
This endpoint updates the SLA Due Date of a process instance |
Inputs |
|
Output |
|
Example |
curl -X 'PATCH' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/sla' \ -H 'accept: */*' -H 'Content-Type: application/json' -d '{ "expirationTime": "2025-12-31T00:00:00.000Z" }' |
/management/processes/{processId}/instances/{processInstanceId}/timers
Type | GET |
---|---|
Description |
This endpoint returns the list of active timers associated with the given process instance |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/{processId}/instances/{processInstanceId}/timers' \ -H 'accept: */*' |
/management/processes/{processId}/migrate
Type | POST |
---|---|
Description |
It will migrate all active process instances of the processID to the target process |
Inputs |
|
Output |
Returns the response with details of the migrated instances including:
|
Example |
curl -X 'POST' \ 'http://localhost:8080/management/processes/{processId}/migrate' \ -H 'accept: */*' \ -H 'Content-Type: application/json' \ -d '{ "targetProcessId": "string", "targetProcessVersion": "string" }' |
/management/processes/{processId}/nodes
Type | GET |
---|---|
Description |
It will get the process nodes corresponding to the mentioned process |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/{processId}/nodes' \ -H 'accept: */*' |
Callback Jobs Service Management API
In BAMOE, the Callback Jobs Service Management API endpoints are used to manage callbacks into the runtime engine from an external job service. These callbacks allow external systems, such as the job service, to trigger the execution of a TriggerJobCommand. If successful, the process instance linked to this command gets signalled and resumes its execution. This API is provided by the following extension:
<dependency>
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-jobs-management</artifactId>
</dependency>
Note
|
This API endpoint is not primarily intended for manual invocation. |
Job Resource API
In BAMOE, the usage of this API is currently not recommended. To work with Jobs, you can use the Data-Index GraphQL API instead.
Job Resource V2 API
In BAMOE, the usage of this API is currently not recommended. To work with Jobs, you can use the Data-Index GraphQL API instead.
Jobs Service Management Resource API
In BAMOE, this API is currently not used. It might be removed in future versions of the product.
Source File Management API
The Source File Management API endpoints in BAMOE allow users to dynamically retrieve BPMN source files at runtime. This API is provided by the following extension:
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-source-files</artifactId>
</dependency>
With the Source File Management endpoints, it’s possible to operate with the following Entities:
-
SourceFile (GET)
/management/processes/sources
Type | GET |
---|---|
Description |
It will get source files corresponding to the uri mentioned as the query parameter. |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/sources?uri={uri}' \ -H 'accept: */*' |
/management/processes/{processId}/source
Type | GET |
---|---|
Description |
It will get source file corresponding to the process. |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/{processId}/source' \ -H 'accept: */*' |
/management/processes/{processId}/sources
Type | GET |
---|---|
Description |
It will get SourceFiles corresponding to the mentioned processId |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/management/processes/{processId}/sources' \ -H 'accept: application/json' |
Process Svg Resource API
In BAMOE, the Process Svg Resource API endpoints can be used to obtain a graphical representation of a process in SVG format. There are two variants of SVGs, a static one for the Process Definition itself, as well as a dynamic one for an active process instance which also contains information about the process execution. This API is provided by following extension:
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-process-svg</artifactId>
</dependency>
/svg/processes/{processId}
Type | GET |
---|---|
Description |
This endpoint returns the svg file for a Process Definition. |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/svg/processes/{processId}' \ -H 'accept: */*' |
/svg/processes/{processId}/{processInstanceId}
Type | GET |
---|---|
Description |
This endpoint returns the svg file for a process instance. |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \ 'http://localhost:8080/svg/processes/{processId}/{processInstanceId}' \ -H 'accept: */*' |