• Stateless put simply means there is no memory of the past. The transaction operates unaware of what went before it, or what comes after it.
  • Stateful means that there is memory of the past. This is achieved by persisting ‘state’ data to a shared resource (e.g. database or session cookie).
  • Stateless processes are intended to support business scenarios that involve short-running logic. An example of a stateless process is one that receives a message asynchronously from a client, transforms the message, and then sends it asynchronously to a resource using a control. Another example is a process that starts with a message broker subscription, transforms a message, and publishes it to another message broker channel. Such a process is analogous to the kinds of routing rules used by traditional message brokering or message routing system.
  • Stateful processes are intended to support business scenarios that involve complex, long-running logic. They typically have more complex reliability and recovery requirements. A process is made stateful by the addition of stateful nodes or logic that forces transaction boundaries (see, Transaction Boundaries). For example, a process that receives a message, transforms it, sends it to a business partner, and then waits for an asynchronous response is stateful because the act of waiting forces a transaction boundary.