Flows to orchestrate are regular Javascript functions but have some
constraints to fulfill the requirements of resumability after termination of
the enclosing vat. Some requirements for each orchestration flow:
must not close over any values that could change between invocations
must satisfy the OrchestrationFlow interface
must be hardened
must not use E() (eventual send)
The call to orchestrate using a flow function in reincarnations of the vat
must have the same durableName as before. To help enforce these
constraints, we recommend:
keeping flows in a .flows.js module
importing them all with import * as flows to get a single object keyed by
the export name
using orchestrateAll to treat each export name as the durableName of
the flow
adopting @agoric/eslint-config that has rules to help detect problems
Flows to orchestrate are regular Javascript functions but have some constraints to fulfill the requirements of resumability after termination of the enclosing vat. Some requirements for each orchestration flow:
OrchestrationFlowinterfaceE()(eventual send)The call to
orchestrateusing a flow function in reincarnations of the vat must have the samedurableNameas before. To help enforce these constraints, we recommend:.flows.jsmoduleimport * as flowsto get a single object keyed by the export nameorchestrateAllto treat each export name as thedurableNameof the flow@agoric/eslint-configthat has rules to help detect problems