I want to start building a technical support application as a personal project, using Windows Workflow Foundation 4 for implementing the business process.I’m very new to WF and BPs but that’s why i am doing this. Did some research and I found that a state machine workflow will be best suited for this as it is a long running process with lots of human intervention. So basically the flow I thought of will be like this:
- user submits a form with all the
required data. - a Ticket object is created and passed
in as an InArgument for the workflow.
The ticket is now in the Pending
state and waits for a ResumeBookmark
call when a admin opens the ticket. -
the admin assigns (meaning that some
of the object properties will be
initialized/modified/etc and also
some db tables) the ticket to a
engineer and it goes into a Assigned
state. And so on..Now my problem is: I can’t figure out a way to add some level of complexity of the State activity flow other than modifying the object properties. By complexity I mean a way to make use of this technology, because for now i don’t see the upside of this compared to a imperative implementation.
any ideas are well received .thanks in advance
First, I’d recommend picking up the book Pro WF: Windows Workflow in .NET 4.0 and working through the tutorials (if you haven’t yet). While it’s not perfect, it covers many of the important topics.
For a long-running process you’re almost certainly going to want to implement persistence. Otherwise if your server goes down, running workflows disappear. Also consider hosting under IIS.
Subscribe to The Problem Solver and check out his answers on SO. He also has an Introduction to WF 4 video series. There are several videos by others on Channel 9, too.
State Machine doesn’t come out of the box; it’s a separate download. It’s not required, though – you could use Sequential, Flowchart, or a combination to achieve what you want.
Be prepared to write custom activities. (See the Channel 9 videos, especially Leon Welicki’s.) You’ll have to implement security, locking, worklists, etc. if those are part of your requirements. WF is not a BPM system out of the box.
Finally, don’t be intimidated. This is all doable, and WF 4 is a well-thought-out framework. Just be prepared to spend considerable time learning and implementing this.