On this page
Client Architecture
The SHAR client library performs the following roles:
- Provides a BPMN parser which converts BPMN to a SHAR state machine.
- Provides a programmatic interface to the SHAR API.
- Facilitates Service Task and Workflow Message registration.
- Listens for registered Service Task and Workflow Messages.
- Decodes and encodes workflow variables.
API calls
The following diagram shows the message flow between SHAR Client and the Engine.
sequenceDiagram autonumber participant Client participant NATS participant SHAR API participant Engine Client--)NATS: WORKFLOW.Api.LaunchWorkflow(request) activate Client NATS--)SHAR API: WORKFLOW.Api.LaunchWorkflow(request) activate SHAR API SHAR API->>Engine: launchWorkflow(*model.LaunchWorkflowRequest) SHAR API--)NATS: WORKFLOW.Api.LaunchWorkflow(response) deactivate SHAR API NATS--)Client: WORKFLOW.Api.LaunchWorkflow(response) deactivate Client
In reality the request and response routing are transparent to the SHAR client, as they are handled by the NATS client and appear as a blocking call similar to GRPC.
BPMN Parser
The BPMN Parser converts a BPMN file into a SHAR state machine model.
Neither the SHAR API nor the SHAR Engine understand anything about BPMN. The client is the only point of contact with the BPMN file content.
Most of the functionality from the Camuda Modeler is supported including running sub-workflows and input and output transformation for variables.