Skip to main content

Variable: BRIDGE_REQUEST_METHODS

const BRIDGE_REQUEST_METHODS: readonly ["history.page", "activity.connection", "activity.completeAsync", "workflowTask.heartbeat"]

Methods of a worker req frame. Each names the task it serves in params.taskRef, so the adapter can check that the session holds it:

  • history.page {taskRef, after, limit?} (a workflow or query task) → BridgeHistoryPageResult: the events after seq after, oldest first.
  • activity.connection {taskRef, name} (an activity task) → the credentials of a connection the activity declares, a JSON object (H2).
  • activity.completeAsync {taskRef} (an activity task, C-R2) → {taskToken}: the attempt hands its completion to an outside system (11 §2.2, workerParkActivityAsync). The attempt ends without a taskResult; the worker sends nothing more for that task.
  • workflowTask.heartbeat {taskRef, localActivities?} (a workflow task, gap G5) → BridgeWorkflowTaskHeartbeatResult: renews the task's lease while its user local activities run (11 §2.12, workerRecordWorkflowTaskHeartbeat). The local activities it names are granted; the worker runs only the granted ones. A task the session no longer holds, or whose lease cannot be renewed, answers STALE_TASK.