Skip to main content

Variable: ACTIVITY_MARKER

const ACTIVITY_MARKER: "fluidgrids.activity" = "fluidgrids.activity"

User activities (11 §2.2, §2.29, CWD9): functions a self-hosted worker runs for workflow code.

  • declareActivity names an activity and its default task queue. The declaration is all workflow code needs: ctx.activity(decl, { args }) issues SCHEDULE_ACTIVITY of kind user.
  • implementActivity attaches the function to a declaration, for the worker. defineActivity does both in one step.
  • dynamicActivity handles every activity name the worker has no implementation for.

Implementations belong to the worker, not to the workflow bundle: lower() reports durable.activityImplInBundle when a workflow module pulls one in.

Pure JavaScript; declarations run inside the isolate.