What is SHAR?

SHAR is a workflow engine and toolkit for running long-lived business processes with durable execution, service task workers, and message-driven orchestration. It’s designed for distributed systems where reliability matters: work is persisted, retried when needed, and coordinated through eventing rather than in-memory state.

Core concepts

Workflows & processes

A workflow defines one or more processes. A process is an executable definition that the engine runs as a sequence/graph of activities (e.g., service tasks, timers, gateways).

Service tasks

Service tasks are units of work implemented by external workers. Workers subscribe to task execution messages, perform the work, and report completion/failure back to the engine. Tasks are versioned and can be organized into sets for routing and operational control.

Variables

Processes carry variables throughout execution. Tasks can read inputs and produce outputs, and workflows can apply output mappings/transforms to shape results.

Reliability: retries and failure handling

Tasks can be configured with retry behavior (attempt counts, backoff/interval strategies, and “what to do when retries are exceeded”). This makes failure handling explicit and consistent across task types.

Compensation (saga-style rollback)

For processes that need safe rollback, SHAR supports compensation: when cancellation or failure requires unwinding completed work, the engine executes compensation steps in reverse order of the original successful actions.

Architecture at a glance

  • Engine / Server: Executes workflow state transitions and coordinates task scheduling.
  • Client / CLI: Loads workflows, launches processes, registers tasks, and runs workers.
  • Messaging & persistence: Uses a message bus with durable storage to ensure progress survives restarts and transient failures.
  • Observability: Logging and telemetry hooks help trace executions and diagnose issues.

Common workflows

  • Orchestrating a multi-step business transaction across services
  • Scheduled or timer-driven processes
  • Human + automation flows (user tasks + service tasks)
  • Strong retry semantics for unreliable dependencies
  • Saga workflows with explicit compensation steps

Get started

  1. Run the server (local/dev).
  2. Register service tasks (task definitions and worker handlers).
  3. Load a workflow definition.
  4. Launch a process instance with initial variables.
  5. Run workers to execute tasks and observe completion.

Where to look next

  • Functionality: overall feature description and behavior
  • Service Task Sets: grouping/routing workers and task execution
  • Fatal error and retry: retry policies and failure escalation

Use the navigation to explore these topics and the examples to see end-to-end flows.