This project is read-only.

Purpose: Compile the workflow options and register them with the Inversion of Control container for access within your application.

Before using FluentWorkflow, we need to register the FluentWorkflow components along with all your state tasks with the IoC container.  In this case we are showing Autofac as that is the container we currently use.  At the moment, only autofac provides the variety of creation patterns and .Net4 metadata registrations. We do this by creating an Autofac ContainerBuilder and then calling the built-in RegisterModule(..) method on it.

In Autofac, the ContainerBuilder.Build() method creates the container.  It is at this point that FluentWorkflow performs the following steps:

  1. Analyzes the workflow for completeness.
    1. Validates that the workflow forms a transitive closure – verifying that we have transitional triggers that point to properly defined states.
    2. Verifies that State Task dependencies are complete and fully referencable.
    3. Verifies that no cyclical State Task relationships exist.
  2. Creates proper state task ordering metadata based on relationships.
  3. Groups metadata along with type registrations for the IoC container.

Once these steps are complete, the types are registered with the container and ready to use.


   1:  var builder = new ContainerBuilder();
   2:  builder.RegisterModule(new WorkflowConfigurationModule());
   4:  var container = builder.Build();

Last edited Jan 2, 2011 at 6:55 AM by sdhebert, version 2


No comments yet.