Last post Oct 11, 2013 04:41 AM by Illeris
Oct 09, 2013 04:23 AM|SaMolPP|LINK
I am having a requirement to implement the below scenario:
Have an aspx form.User submits this and it will go to an approver. Assume, if the approver did not approve the form within 30 days
on the 31st day it will be auto-approved and it will be going into the InBox of Approver-2 [ level-2 ] .
Again here the form stays till few days - say- 5 days- if its not approved by him on the 6th day , the form is auto-approved and it will go to 3rd level .
So pls advice should i go ahead and create a sequential workflow for this.
any disadvantages if i create a normal aspx form and set a timer job which runs every morning and checks the status of this form - in sql db --> formstatus column - if its approved i will populate the values with the 2ndlevel Approver's Form.
Can i achieve the functionality without going through the complex workflow foundation concept in .net 4.0?
am using VS 2010 / .NET 4.0.
If the suggestion is that i should go for workflow, which one should i opt for? Sequential or StateMachine? pls suggest
help is appreciated.
Oct 09, 2013 10:07 AM|Illeris|LINK
The cleanest solution is by using workflows (sequential will do just file). The concept is not that difficult, you'll find samples enough on the internet (including source code that can get you up to 50%)
The timer solution is not very reliable. What if the site goes down? Also, timers in web apps are rarely a good idea. You could do this with a windows service that keeps on running, but I doubt it will be less complex then WWF.
Oct 10, 2013 01:41 AM|SaMolPP|LINK
thanks for the reply.
i am having a doubt here. since the 30 days of interval is avaiable for the next approver to approve the form[ if no one comes in between and changed the status , thus by assuming the worst case of NO-ACTION IN 30 DAYS], it becoming a long running process.
so shouldn't it be a statemachine workflow ?
also since the 2nd level approver depends upon the EXTERNAL EVENT to occur [means a timer /service to update the db status column ] , so i am thinking, should it not be a case of state machine workflow. as per the definition of statemachine , - if
a scenario depends upon a external event or a if its a long running process or if the outcome is not certain which state is getting executed next , so we should go for STATEMACHINE. thats why i am confused about it.
Can you pls provde me some links / src code if for this situation, sequential workflow will meet my requirement, pls help my providing any links/ src code.
Oct 11, 2013 04:41 AM|Illeris|LINK
If you need your workflow only to respond to external events, the state machine will do perfectly. Otherwise not. See this article for a comparison : http://windowsworkflow.wordpress.com/2006/09/11/types-of-windows-workflows-sequential-vs-state-machine/