Search code examples
workflow-foundation-4

WF4 questions (current state & compilation)


We're currently trying to see if we should use WF4 for a project and I have 2 questions since I don't really know that much about the latest WF version:

  1. If a create a state machine workflow, is there a way to know the current state of a workflow instance? I.e: I have a complaint state machine WF and I would like to know the current state of one complaint, can I do it without loading the WF instance?

  2. Whenever there is a change in a workflow definition (i.e: the process changed), will it generate a new DLL (assembly)?

Thanks a lot.


Solution

    1. Not out of the box but that is quite easy to do using a TrackingParticipant
    2. It depends on how you define you workflows. A XAML file can be compiled into a CLR type and in that case you would need to recompile. You can also load them dynamically from disk, or some other store, if you want and execute them that way. And finally a workflow service (XAMLX file) is always loaded as a file and never compiled.