Skip to main content

Workflow message passing - Ruby SDK

A Workflow can act like a stateful service that receives messages: Queries, Signals, and Updates. These messages interact with the Workflow via handler methods defined in the Workflow code. Clients use messages to read Workflow state or change its behavior.

See Workflow message passing for a general overview.

Write message handlers

Query handlers

Signal handlers

Update handlers and validators

Send messages

Send a Query

Send a Signal

From a Client

From a Workflow

Signal-With-Start

Send an Update

Update-With-Start

Message handler patterns

Add async handlers

Use wait conditions

In handlers

Before finishing the Workflow

Use WorkflowInit to access input early

Use locks to prevent concurrent handler execution

Troubleshooting

Signal issues

Update issues

Query issues

Dynamic handlers

Dynamic Query

Dynamic Signal

Dynamic Update