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.
- Read the requestCheck the order and requested slot against the declared types.
- Decide which path appliesEvaluate the cutoff against the dispatch time and apply the relevant policy.
- 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.
Workflow contracts
OFR for operations, OBC for steps, OPC for policies, OTC for data
Guide execution
State machine
Runs OBC steps and applies the linked policies
Evaluates with
CEL
Checks conditions against the current state
Through bound operations
Project memory
Links tasks, decisions, versions and evidence
Reads context and records results
Project agent
Continues work or proposes a new task
Calls
Reschedule delivery
Operation declared in OFR
Calls a compatible version if permitted
External system or agent
Finds the operation in the capability catalogue