📘
@node-test/bus
  • @node-ts/bus
  • Getting started
    • Installation
    • Handling messages
    • Shutting down cleanly
  • Reference
    • Bus
    • BusConfiguration
    • BusInstance
  • Getting help
  • Guide
    • Messages
      • Events
      • Commands
      • System messages
    • Message attributes
      • Correlation id
      • Attributes
      • Sticky attributes
    • Workflows
      • Creating a workflow
      • Starting
      • Handling
      • State
      • Completing
      • Example
    • Transports
      • RabbitMQ
      • Amazon SQS
      • Redis
      • Custom transports
    • Persistence
      • Postgres
      • MongoDB
      • Creating a persistence
    • Serializers
      • Class serializer
    • Loggers
      • Custom loggers
    • Middleware
    • Lifecycle hooks
    • Retry Strategies
    • Dependency injection
    • Long running processes
Powered by GitBook
On this page

Was this helpful?

  1. Guide

Workflows

PreviousSticky attributesNextCreating a workflow

Last updated 3 years ago

Was this helpful?

Workflows help orchestrate processes in a distributed environment. Oftentimes business processes are a series of steps to be taken. Each step is a command that's sent, with the next step being run after the prior one completes.

This can be difficult in a distributed environment as you can't choose which node will receive events to trigger then next command, and so you can't keep the state of the workflow locally.

In @node-ts/bus, the state of a workflow is stored in a technology like Postgres. Because the state is stored locally it means any node can consume the state and decide which step should happen next.

persistence