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: stringOptionaloptions: ExtensionTypeOptionaloptions: ExtensionTypeExecutes 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
pending flows will not transition from the trigger to adjacent children until resumed
Optionaloptions: ExtensionTypeExtracts 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
The entry point for every workflow graph. Each graph must have exactly one
triggeractivity, which executes when the graph'ssubscribestopic receives a message (viahotMesh.puborhotMesh.pubsub).The trigger initializes the job, sets its unique ID and key, binds the incoming payload as the trigger's output data, and transitions to adjacent activities defined in the
transitionssection.YAML Configuration
Key Behaviors
stats.idis provided, it resolves via@pipeexpressions against the input data. Otherwise a UUID is generated.DuplicateJobErroris thrown (unless it's a crash-recovery scenario).{ pending: <seconds> }, the trigger creates the job but does not transition to children until resumed.See
TriggerActivity for the TypeScript interface