A Business Service on BAMOE automatically exposes REST endpoints for every Process Definition it includes.
For example, the following REST operations use the endpoint /hiring to interact with the hiring process of the application. You can use a REST client, curl utility, or the Swagger UI configured for the application at http://localhost:8080/swagger-ui/ to send API requests to interact with the running application.
hiring processThe following sections describe the Process API in detail.
|
Note
|
This API is generated dynamically based on the Process Definitions contained in the application. This means that the main context of these endpoints differ for each process, as it is based on the id of the Process Definition. For some endpoints, the process variables define the structure of the payload. In addition, the number of available endpoints is dependent of the structure of the Process Definition.
|
/{process_id}
| Type | GET |
|---|---|
Description |
This endpoint returns a list of active process instances for the given process. |
Inputs |
|
Output |
A JSON List of all active process instances for the given process. The list contains the |
Example |
curl -X 'GET' \
'http://localhost:8080/{process_id}' \
-H 'accept: application/json'
|
/{process_id}
| Type | POST |
|---|---|
Description |
This endpoint is provided to start a new process instance of the given process. |
Inputs |
|
Output |
|
Example |
curl -X 'POST' \
'http://localhost:8080/{process_id}?businessKey=value' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{ "process_variable" : "json" }'
|
/{process_id}/schema
| Type | GET |
|---|---|
Description |
This endpoint returns the schema of the given process. |
Inputs |
|
Output |
The schema representation of the given process. This includes the process variables tagged as |
Example |
curl -X 'GET' \
'http://localhost:8080/{process_id}/schema' \
-H 'accept: application/json'
|
/{process_id}/{processInstanceId}
| Type | GET |
|---|---|
Description |
This endpoint returns information about an active process instance. |
Inputs |
|
Output |
|
Example |
curl -X 'GET' \
'http://localhost:8080/{process_id}/{processInstanceId}' \
-H 'accept: application/json'
|
/{process_id}/{processInstanceId}
| Type | PUT |
|---|---|
Description |
This endpoint allows to update the process input variables. |
Inputs |
|
Output |
|
Example |
curl -X 'PUT' \
'http://localhost:8080/{process_id}/{processInstanceId}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{ "process_variable" : "json" }'
|
/{process_id}/{processInstanceId}
| Type | DELETE |
|---|---|
Description |
This endpoint allows to abort a process instance. |
Inputs |
|
Output |
|
Example |
curl -X 'DELETE' \
'http://localhost:8080/{process_id}/{processInstanceId}' \
-H 'accept: application/json'
|
/{process_id}/{processInstanceId}
| Type | PATCH |
|---|---|
Description |
This endpoint allows to update the process input variables. |
Inputs |
|
Output |
|
Example |
curl -X 'PATCH' \
'http://localhost:8080/{process_id}/{processInstanceId}' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{ "process_variable" : "json" }'
|
/{process_id}/{processInstanceId}/{nodeName}
| Type | GET |
|---|---|
POST |
DELETE |
Description |
Various endpoints for nodes acting as wait states in the process. This could include WorkItem / UserTask nodes as well as other wait states, such as a Catching Intermediate Signal event. |
Note |
For UserTasks, it is recommended to use the dedicated User Task API instead. |