Help with Custom Workflow that monitors an objects state
Posted
by zSysop
on Stack Overflow
See other posts from Stack Overflow
or by zSysop
Published on 2010-03-29T18:57:39Z
Indexed on
2010/03/31
3:23 UTC
Read the original article
Hit count: 474
workflow-foundation
|.net-3.5
I need to write a workflow that monitors the status of an object. (It could wait for days or hours for a state to change)
I have the following states for the object (lets call it an Issue object):
1) Created
2) Unowned
3) Owned
4) UnAssigned
4) Assigned
6) In Progress
7) Signed Off
8) Closed
I would also need to take some action on an object if the object was within a certain state for a defined period (not really sure on how this can be accomplished either).
The object's owner/assignee can change at any point (i.e. Go from In Progress to UnOwned) so i am guessing that a state machine diagram is what i would need to use. If my thinking is incorrect then please let me know.
My application is written in c# .net 3.5.
I was thinking about having a service method called CreateIssue that would insert the ticket into the db and then begin an instance of a workflow (with the object or an id of the object as parameters). I wasn't sure of how the workflow would then know when a particular object has been updated, or if the object's state has changed. I've done some really simple "hello world" type of apps with windows workflow foundation 3.5 but have not yet grasped how to do go about implementing something like this.
Any direction on this will be extremely helpful.
Thanks in advance.
© Stack Overflow or respective owner