← Learn OKHAM

The state machine coordinates the work

This example uses the OKHAM state machine as its executor. A project can also use contracts with its existing application or workflow engine.

An OBC defines where a workflow starts, what each step does and which conditions lead to the next step. An OPC defines when an operation is permitted. The state machine validates the data, evaluates declared CEL conditions against the current state and calls the configured implementation when the applicable policy permits it.

  1. Read the requestCheck the order and requested slot against the declared types.
  2. Decide which path appliesEvaluate the cutoff against the dispatch time and apply the relevant policy.
  3. Run the operationsFor an admitted request, save the new slot and notify the delivery team after the save succeeds.

Declare the sequence, data mappings and branches in the OBC. Each implementation can focus on its own job, such as saving a record or sending a notification. That removes much of the code written just to pass values, repeat permission checks and connect one operation to the next.

Follow an OBC step by step

Workflow execution, project memory and capability reuse
Workflow contracts OFR for operations, OBC for steps, OPC for policies, OTC for data
State machine Runs OBC steps and applies the linked policies
CEL Checks conditions against the current state
Project memory Links tasks, decisions, versions and evidence
Project agent Continues work or proposes a new task
Reschedule delivery Operation declared in OFR
External system or agent Finds the operation in the capability catalogue