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
Dispatches work to a registered callback function. The
workeractivity publishes a message to its configuredtopicstream, where a worker process picks it up, executes the callback, and returns a response that the engine captures as the activity's output.YAML Configuration
Worker Registration (JavaScript)
Workers are registered at initialization time via the
workersarray inHotMesh.init. Each worker binds atopicto acallbackfunction.Retry Policy
Retry behavior is configured at the worker level (not in YAML) via the
retryPolicyoption. Failed callbacks are retried with exponential backoff untilmaximumAttemptsis exhausted. ThemaximumIntervalcaps the delay between retries.Execution Model
Worker is a Category A (duplex) activity:
process): Maps input data and publishes a message to the worker's topic stream.processEvent, inherited): Receives the worker's response, maps output data, and executes the step protocol to transition to adjacent activities.See
WorkerActivity for the TypeScript interface