title: Saga Implementation with a persistent store in .net. Alternative to Masstransit Saga?
body: <p>I have been using Automatonymous State Machine with MassTransit. I enjoyed working with that state/saga machine, especially how it was configured and setup, as well as that I can feed the state machine with events that implements contracts to be used as messages. </p>
  
  <p>This is how it can look like:</p>
  
  <pre><code> //define the statemachine with a State class (ServiceState)
   public class ServiceStateMachine :
      AutomatonymousStateMachine&lt;ServiceState&gt;{
  
      //define available states
      public State Available { get; set; }
      public State WaitForItem { get; set; }
  
      //define available events
      public Event&lt;RequestItem&gt; RequestItem { get; set; }
  
      //configure the state machine and configure the store to use the ServiceState class
      public void ConfigureStateMachineCorrelations(StateMachineSagaRepositoryConfigurator&lt;ServiceState&gt; r)
  
       //bind events to contracts and conditions
       r.Correlate(RequestItem,
              (state, message) =&gt;
                  state.CorrelationId == message.CorrelationId)
      }
  
  
      public ServiceStateMachine(IStateMachineActivityFactory activityFactory
      {
           State(() =&gt; Available);
           State(() =&gt; WaitForItem);
  
           Event(() =&gt; RequestItem);
  
           //bind states, events, activities, custom actions...             
           During(Available,
              When(RequestItem)
                  .Then((state, message) =&gt;
                  {
                      state.ServiceId = message.ServiceId; // just an example baby!
                  })
                  .TransitionTo(WaitForItem)
                  .Then(() =&gt; _activityFactory.GetActivity&lt;RequestItemActivity, ServiceState&gt;())
      }
  </code></pre>
  
  <p>What alternative Saga implementations are there that are similar, but not connected to MQ architectures?  I guess what I am really looking for is a State Machine or Saga Implementation with at least an in memory persistent store.</p>