Most of messaging middleware frameworks like MassTransit, Rebus or NServiceBus implement one or more durable process types. MassTransit, for example, has a routing slip/saga (Courier) and process manager (Saga) patterns. The first one keeps the state in the message itself. The second one stores it in the database.