8 Service APIs
This section provides a reference for APIs that should be implemented by this Building Block.
Last updated
Was this helpful?
This section provides a reference for APIs that should be implemented by this Building Block.
Last updated
Was this helpful?
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.
Retrieves the list of workflow processes deployed on the workflow engine.
Provides for each process the information: definition ID, version, status (active/suspended).
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.
Retrieves the list of running process instances for a given workflow process definition ID.
Get Instances workflow process by ID (GET) /instances?processId=123
Retrieves the status of a single process instance given an instance ID.
Stops execution of a running process instance
List processes. (GET) /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. (GET) /processes/{processId}
Instantiate a process instance. (POST) /processes/{processId}/start
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. (GET) /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. (GET) /instances/{instanceId}
Retrieves the status of a single process instance given an instance ID.
Stop a process instance (POST) /processes/{processId}/stop
Stops a running processs instance
Pass in the ID of the process and it will return all information about that process
/processes/{processId}
The id for a defined process in the workflow engine.
bf20fe53-5548-11ed-9dd4-0242ac150002
Create a process instance and register it with the execution engine
/processes/{processId}/start
The id for a defined process in the workflow engine.
bf20fe53-5548-11ed-9dd4-0242ac150002
Optionally include a processId in the query params to filter by that process
/instances/
The id for a defined process in the workflow engine.
bf20fe53-5548-11ed-9dd4-0242ac150002
By passing in the process instance ID, get full details on its execution, including server logs emitted.
/instances/{instanceId}
Numeric ID of a process instance
95aef406-3a7a-11e5-85b6-dafa20524153