Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1002 Bytes

README.md

File metadata and controls

21 lines (14 loc) · 1002 Bytes

Signals and Queries

This example demonstrates the usage of Signals, Queries, and Workflow Cancellation.

Signals, Queries, and cancellation messages are sent through the WorkflowClient:

src/client.ts

and are handled in the Workflow:

src/workflows.ts

Running this sample

  1. Make sure Temporal Server is running locally (see the quick install guide).
  2. npm install to install dependencies.
  3. npm run start.watch to start the Worker.
  4. In another shell, npm run workflow.start to run the Workflow.
  5. Run npm run workflow.query to query the Workflow. Should print blocked? true
  6. Run npm run workflow.signal to unblock the Workflow. Should print unblockSignal sent
  7. Run npm run workflow.query to query the Workflow. Should print blocked? false