Workflow project as a PRISM module

Topics: Prism v1, Prism v2 - WPF 3.5
Apr 20, 2009 at 6:03 AM

I need to develop workflow project which can be used as a PRISM module.
I did research on this but didn't get any solution on this.

Any help/links re. to WF and PRISM integration would be helpful.

- hp
Apr 21, 2009 at 5:27 PM

Hi hp,


What is it more precisely that you need to do?


All you need to have for a prism module is a class that implements IModule and load it. There is no problem if the project is a wokflow project or a plain class library.
I did a really small spike module that provides a service implemented in WF to other modules, and found no issues. What I did was:

1.       Created a WF project

2.       Added a code activity to the default workflow (just to see it works)

3.       Added a class that implements IModule and registers a service IWorkflowService in its Initialize method

4.       Created a class that implements IWorkflowService that in its constructor creates a WorkflowRuntime and has method to instantiate the default Workflow.

5.       Use the service from another module.


Of course you will need to solve several Workflow related stuff such as:

·         Workflow lifetime

·         WorkflowRuntime lifetime

·         how to instantiate Workflows from other modules in a decoupled way

·         etc, etc, etc.


I have no knowledge of any publicly available project, Quickstart, Reference Implementation or guidance on integrating Prism and WF. There is one related discussion you might find interesting:

·         Using WF activities with Dependency Injection in a CAL application


If you had in mind a different scenario that you are not able to solve, please let us know so we can provide a more specific answer. Let me know if this helps!


Matias Bonaventura

Apr 22, 2009 at 4:55 AM
Hi matiasbonaventura,

Thanks for your quick reply. let me try out some sample applications to demonstrate WF and PRISM integration...

- hp