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

BPMN Parser

The BPMN Parser converts a BPMN file into a SHAR state machine model.

Currently the client supports parsing Shar BPMN Editor and Camunda Modeler 8 BPMN files.