Workflow without WF

Workflow without WF

Old forum URL: forums.lhotka.net/forums/t/3253.aspx


triplea posted on Tuesday, July 24, 2007

It is sad but I need to implement a (mini) workflow mechanism in one of my apps but the production servers do not have .Net 3.0 installed and won't be installed in the near (or far) feature. I was just wondering if somebody can describe a pattern on doing this.
In my case I have an EditableRoot object (Client) which can be moved from a number of stages (e.g. Stage 1, Stage 2...) and the move is subject to validation and authorization rules and finally creates an audit trail (EditableChildList ClientHistory).
I thought of creating a WorkflowClient (EditableRoot containing a WorkflowClientHistoryList-EditableChildList)  and in addition have a ClientWorkflowController that would contain static methods such as:
public static bool CanMove(WorkflowClient client, string fromStage, string toStage)
public static void Move(WorkflowClient client, string toStage)

But I can't help thinking this is sloppy (though its the best I can think right now). If anybody has implemented something similar or can point me somewhere that would be greatly appreciated.

Also, what would be really cool if there are any suggestions on how to minimize the effort if I finally get .Net 3.0 enabled servers and decide to use WF :-)

ajj3085 replied on Tuesday, July 24, 2007

This thread is similar to what you are trying to do, although without WF.

triplea replied on Wednesday, July 25, 2007

Thanks for the link ajj3085. So in my case I guess I will have the following objects then:

And hopefully one day I will be able to replace ClientWorkflowController with a workflow in WF with not too much convertion work...

Hope the new CSLA ebook contains some WF examples/suggestions :-)

 

Copyright (c) Marimer LLC