cc-everywhere

Abstract Class: RequestResponseWorkflowContext<T>

Base class for workflow contexts that send a WORKFLOW_CONTEXT message to the agent and await a matching CUSTOM_EVENT reply. Encapsulates the single-flight guard, per-call requestId matching, timeout, listener registration, and cleanup.

Extends

Type Parameters

Type Parameter
T extends ActionContext<DesignConfig>

Constructors

Constructor

new RequestResponseWorkflowContext<T>(context): RequestResponseWorkflowContext<T>;

Parameters

Parameter
Type
context
T

Returns

RequestResponseWorkflowContext<T>

Inherited from

WorkflowContext.constructor

Properties

Property
Modifier
Type
Inherited from
context
public
T
WorkflowContext.context

Methods

sendCustomMessage()

sendCustomMessage(data): void;

Sends a message to the SDK Agent to update the state of current running workflow.

Parameters

Parameter
Type
Description
data
unknown
incoming data coming from client to update the workflow. Note - Type of data is limited to what postMessage supports.

Returns

void

Inherited from

WorkflowContext.sendCustomMessage