Optionalcontext: JobStateif the job is created/deleted/created with the same key, the 'gid' ensures no stale messages (such as sleep delays) enter the workstream. Any message with a mismatched gid belongs to a prior job and can safely be ignored/dropped.
OptionalmsgGID: stringExecutes the 3-step Leg1 protocol for Category B activities (Leg1-only with children, e.g., Hook passthrough, Signal, Interrupt-another). Uses the incoming Leg1 message GUID as the GUID ledger key.
Step A: setState + notarizeLeg1Completion + step1 markers (transaction 1) Step B: publish children + step2 markers + setStatusAndCollateGuid (transaction 2) Step C: if edge → runJobCompletionTasks + step3 markers + finalize (transaction 3)
true if this transition caused the job to complete
Executes the 3-step Leg2 protocol using GUID ledger for crash-safe resume. Each step bundles durable writes with its concluding digit update in a single transaction.
true if this transition caused the job to complete
Extracts the job status from the last result of a transaction. Used by subclass Leg1 process methods for telemetry.
Extracts the thresholdHit value from transaction results. The setStatusAndCollateGuid result is the last item.
Optionaltransaction: ProviderTransactionOptionaltransaction: ProviderTransaction
Base class for all HotMesh activity types. Activities are the execution units within a YAML-defined workflow graph. Each activity represents a node in a Directed Acyclic Graph (DAG) that the engine orchestrates.
Activity Categories
Activities fall into three execution categories:
Category A (Duplex): Two-phase activities with Leg 1 (dispatch) and Leg 2 (response). Used by
WorkerandAwait. Leg 1 publishes a message and waits; Leg 2 handles the response viaprocessEventand transitions to adjacent activities.Category B (Leg1-only with children): Single-phase activities that execute work and transition to children using the crash-safe
executeLeg1StepProtocol. Used byHook(passthrough mode),Signal, andInterrupt(target mode).Category C (Leg1-only, no children): Terminal activities that execute without spawning children. Used by
Interrupt(self mode).Shared YAML Configuration
All activity types support these base properties in the YAML descriptor:
typetrigger,worker,await,hook,signal,interrupt,cycletitleinput.schemainput.mapsoutput.schemaoutput.mapsjob.mapsemittrue, emits a message to the graph'spublishestopicpersisttrue, emits the job-completed event while keeping the job activeexpire-1= forever)statusThresholdcycletrue, leaves Leg 2 open so the activity can be re-enteredData Mapping Syntax
Mapping expressions use curly-brace references to bind data between activities and the shared job state:
See