In order to create an Exit State Task, we create a public class that derives from the interface IExitStateTask<TState, TTrigger, TTriggerContext>.  Note that the workflow does not have to specified here.

There is a lone interface that needs to be implemented called ‘Execute’:

   1:  public interface IMutatingEntryStateTask<TState, TTrigger, TTriggerContext> : IStateTask<TState, TTrigger, TTriggerContext>
   2:  {
   3:      /// <summary>
   4:      /// Executes the specified entry state step info.
   5:      /// </summary>
   6:      /// <param name="entryStateTaskInfo">The entry state step info.</param>
   7:      /// <param name="flowMutator">The flow mutator.</param>
   8:      void Execute(EntryStateTaskInfo<TState, TTrigger, TTriggerContext> entryStateTaskInfo,
   9:                      IFlowMutator<TTrigger, TTriggerContext> flowMutator);
  10:  }



Remember that you can constructor inject any services provided by the IoC container.

Last edited Jan 4, 2011 at 6:56 AM by sdhebert, version 13


No comments yet.