WFPad – Viewing/Editing Workflow’s in XML


Note: This posting is for Beta 1 of Windows Workflow Foundation. For an updated Beta 2 build, please go to: http://blogs.msdn.com/markhsch/archive/2006/03/02/542596.aspx


Windows Presentation Foundation has XAMLPad as a tool. With this tool, you simply enter in some Xaml at the bottom and view the results within the application itself. Why not create something like that for Windows Workflow Foundation? So I did.


 



WFPad is the XAMLPad for Windows Workflow Foundation (as WF moves to XAML we’ll see how XAMLPad works with this). You can use the designer and hit the down arrow for synchronization to instantly view the XOML for that workflow. On the flipside, you can enter in some XOML, hit the up arrow synchronization button and the designer will load that XOML and display the workflow accordingly. Being that it’s an editor of sorts, you can save any workflow’s to the file system as xoml files as well as load xoml files.


I also gave it the ability to navigate to an assembly containing workflow’s, select a workflow within that assembly and then load it. I am able to extract the xoml just fine, but currently the designer is unable to load it (I know why, just not how to fix it yet).


This app only took about an hour to create (which is why I haven’t figured out that bug) but would not have been possible without some additional legwork provided by other folks. I used the Workflow Designer Control and I am using the WorkflowAssembly class found in the WorkflowReflector project.


Let me know if you want me to add anything, but since I’m giving the source, it should be easy enough for you to expand.


Click here to download the source/app


Comments (19)

  1. chris says:

    Microsoft should get Hulk Hogan to be the marketing spokesperson for the WWF: I think it would attract a whole plethora of new potential users… I know I used to love him on the WWF Friday night fights…

  2. John_Evdemon says:

    This rocks! Thanks Mark!

  3. doriak says:

    Mark,

    I downloaded your app and played with it a little bit. It is awesome. This can be used as a based for documenting processes.

    One thing I wonder is if a "commenting" feature could be added to it. What I mean is the ability to add "visual comments" to individual activities (like the "annotation" shape in Visio). I know that visual representation does not exist in WF, but it would be interested to see if this could be added. Just a thought.

    Doriak

  4. Guennadi Vanine says:

    this really rocks. The developers gonna stay without work (unemployed) in Windows soon.

    Since I have no dedicated time just to Windows and .NET, I’d appreciate if u unveil the "why" in "I know why, just not how to fix it yet", pliiiiiz

    Guennadi Vanine

  5. Guennadi Vanine says:

    strange my comment is not accepted?!

    Come on!

    Once again

    this really rocks. The developers gonna stay without work (unemployed) in Windows soon.

    Since I have no dedicated time just to Windows and .NET, I’d appreciate if u unveil the "why" in "I know why, just not how to fix it yet", pliiiiiz

    Guennadi Vanine

  6. Mohammed Sharikh says:

    Brilliant stuff, however, could you please modify the code to make it build for Beta2?

  7. Michael Tomlinson says:

    I second that … beta2 buildable version please!!

  8. VGV8 says:

    seems like Mark has syndrome of never returning to what he has written

  9. Majid E says:

    I downloaded the sample code, but it doesn’t compile.  For example I had to implement CheckType on the WorkflowCompilerOptionsService but after I got that compile error fixed, I’m getting tons of other compile errors.  Did you guys have to do anything special to get this to compile.  Note, I’m using VS 2005 and I’ve already installed WinFx and WWF.  

  10. By now, you’ve probably heard about the Windows Workflow Foundation (WF).  WF, like Windows Communication…

  11. Very many thanks for a good work. Nice and useful. Like it!

Skip to main content