Skip to content

js-bao-wss-client


js-bao-wss-client / WorkflowStatusEvent

Interface: WorkflowStatusEvent ​

Payload of the workflowStatus event (client.on("workflowStatus", ...)). Delivered in real time when a workflow run started by this user reaches a terminal state. output carries the final result on completion, error the failure message, and needsApply signals that the result awaits the client-side apply step.

Properties ​

contextDocId? ​

optional contextDocId?: string


error? ​

optional error?: string


errorCode? ​

optional errorCode?: WorkflowRunErrorCode

Platform classification of a "failed" run — compare this to a constant instead of matching error text. Omitted on any non-failed status, and absent for a failure the platform did not classify.


meta? ​

optional meta?: Record<string, unknown>


needsApply? ​

optional needsApply?: boolean


output? ​

optional output?: unknown


runId ​

runId: string


runKey ​

runKey: string


skipReason? ​

optional skipReason?: "LOCK_CONTENTION"

Why a "skipped" run did not run. "LOCK_CONTENTION" means the run's declarative lock was held and the definition declared onContention: "ignore", so the platform elided the run instead of failing it. Omitted on any non-skipped status; a skipped frame carries no error.


startedByUserId? ​

optional startedByUserId?: string


status ​

status: "completed" | "failed" | "terminated" | "skipped"


type ​

type: "workflowStatus"


workflowId ​

workflowId: string


workflowKey ​

workflowKey: string

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30