This section provides a reference for APIs that should be implemented by this Building Block.
This section provides a reference for APIs that should be implemented by this Building Block. The APIs defined here establish a blueprint for how the Building Block will interact with other Building Blocks. Additional APIs may be implemented by the Building Block, but the listed APIs define a minimal set of functionality that should be provided by any implementation of this Building Block.
The GovStack non-functional requirements document provides additional information on how 'adaptors' may be used to translate an existing API to the patterns described here.
All APIs will be defined using the OpenAPI (Swagger) standard. The API definitions will be hosted outside of this document. This section may provide a brief description of the required APIs. This section will primarily contain links to the GitHub repository for OpenAPI definition (YAML) files as well as to a website hosted by GovStack that provides a live API documentation portal.
This section also provides guidance on how candidate products are tested and how GovStack validates a product's API against the API specifications defined here.
The tests for the Workflow Building Block can be found in this GitHub repository.
List processes.
Retrieves the list of workflow processes deployed on the workflow engine.
Provides for each process the information: definition ID, version, status (active/suspended).
Get individual process definition.
Instantiate a process instance.
Instantiates a given process definition Id. Responds with instance Universal Unique Identifier.
Process variables (just a PAYLOAD object - process, should be able to extract from the payload JSON object attributes) may be supplied in the request body.
If the start event has mandatory variables, the workflow engine will perform backend validation.
List process instances.
Retrieves the list of running process instances for a given workflow process definition ID.
Get Instances workflow process by ID (GET) /instances?processId=123
Get the status of an existing process instance by instance ID.
Retrieves the status of a single process instance given an instance ID.
Pass in the ID of the process and it will return all information about that process
The id for a defined process in the workflow engine.
"bf20fe53-5548-11ed-9dd4-0242ac150002"
process found and representation returned
generated by a system surrogate primary key
name of a process
Specifies whether the Process is executable
whether Messages and Events, not modeled in Process, can occur when the Process is executed or performed
By passing in the process instance ID, get full details on its execution, including server logs emitted.
Numeric ID of a process instance
"95aef406-3a7a-11e5-85b6-dafa20524153"
A detailed process instance status object
generated by a system surrogate primary key
"020229ae-9fd5-11ed-94af-0242ac150002"
reference to the process definition
"ReviewInvoice:1:bf20fe53-5548-11ed-9dd4-0242ac150002"
Initiation Timestamp
"2023-11-08T17:23:00"
see BPMN specification v.2.0 section 13.2.2
"running"
last change Timestamp
"2023-11-08T17:23:00"
Optionally include a processId in the query params to filter by that process
The id for a defined process in the workflow engine.
"bf20fe53-5548-11ed-9dd4-0242ac150002"
An array of process instances
generated by a system surrogate primary key
"020229ae-9fd5-11ed-94af-0242ac150002"
reference to the process definition
"ReviewInvoice:1:bf20fe53-5548-11ed-9dd4-0242ac150002"
Initiation Timestamp
"2023-11-08T17:23:00"
see BPMN specification v.2.0 section 13.2.2
"running"
last change Timestamp
"2023-11-08T17:23:00"
Listing of all processes with basic information
list of processes
generated by a system surrogate primary key
name of a process
Specifies whether the Process is executable
whether Messages and Events, not modeled in Process, can occur when the Process is executed or performed
Create a process instance and register it with the execution engine
The id for a defined process in the workflow engine.
"bf20fe53-5548-11ed-9dd4-0242ac150002"
Process instance initiation payload (initial 'state' for the process)
Process started; registered for execution with unique process instance ID.
The unique process instance ID.
"95aef406-3a7a-11e5-85b6-dafa20524153"
The process definition ID.
"invoice:1:15e97a1c-312d-11e5-aca3-a0e120524153"
States if process instance is suspended
false
States if process instance has ended
false
Provides the execution state of the process instance
"running"