escalation rules


Badge +3
i have an Approval activity that will go to two activities: one will go to the NextApprover, and the other will go to an AlternateApprover if the supposed next approver doesn't take action in 48 hours. i made an escalation rule on the Approval activity that will GoTo AlternateApprover activity after 48 hours. the thing is, escalation rules will always escalate no matter what (according to the help files). how can i make it so that if the NextApprover activity already runs, the escalation rule on the Approval Activity (that will run the AlternateApprover activity) won't run anymore since it didn't reach 48 hours anyway?

thanks

10 replies

Badge +11
If I understand you correctly, you've got an Escalation on the 'Approver1' Activity which, if 'Approver1' user did not action the item within 48 hours, will redirect the flow to 'Alternate Approver' Activity. I assume the Line Rule from 'Approver1' to 'Alternate Approver' reads something like: If Activity1 expired, follow this line.

Remember, if 'Approver1' user has actioned the item within the 48 hours, the Activity would COMPLETE and NOT expire i.e. the Line to 'Approver2' would be followed and NOT the line to 'Alternate Approver'.

An Escalation will always fire - yes - as long as the Activity exists. Once the Activity completes successfully however, the Escalation on it, will NOT be activated.

Hope this makes sense,
Ockert
Badge +3
I tried using the Escalation Action property (in the Approver1 activity) and set the GoTo to the "Alternate Approver" activity. Is that the right way to go about it or not? Or should I have set it to Expire instead?

[quote user= true or something similar to that?

Sorry for the seemingly asinine questions. Hehehe.

And thanks also for the quick reply :)
Badge +11
You can use 'Goto Activity' - it should work. The only thing I do not like about it is that the jump from one activity to the next will not be visible in the ViewFlow component.

I would use 'Expire Activity' with a line rule similar to the screenshot below.

Regards,
Ockert
Badge +3
I have found a solution to the GotoActivity method. When you use the GotoActivity method, it will indeed go to your specified activity, but will not "color" the lines. It will not be visible in the View Flow component.

What I did was to satisfy all the line rules of the line that it should follow by assigning my WorklistItem's data fields (myWorklistItem.ProcessInstance.DataFields["someDataField"] = someVariable) and then calling the Finish method. This way, you can do without the GotoActivity, execute still all the events under your previous activity (if this is what you want to do), satisfy the line rules, and in effect "color" the line.

[P.S. the reason why I had to do this was because the workflow was being instantiated from an outside party (windows service) and not from the normal forms in the worklist]

Thanks to Ockert and Renier for answering all my questions regarding this GotoActivity, the data fields, and the Open & OpenWorklistItem methods before. It all helped a lot in my arriving to that solution. Thanks for the quick replies!
Badge +11
Thank you for the feedback...

Glad we could help!!

Regards,
Ockert
Badge +2

I too would like to have the lines between activities to be colored after an escalation occurs. If I may ask for some clarification on this. 


You are no longer using the GoToActivity in your Escalation Action Rule? But, are setting a DataField variable in which the line rule acts upon after you "finish" the current acitivty?


Hence, I could have a FormStatus variable that represents each of 5 activities from 1 to 5, each linked to all activities above it via lines based upon the FormStaus = n rule. (i.e. 1 linked to 2, 1 to 3, 1 to 4, 1 to 5, 2 to 3, 2 to 4, 2 to 5, 3 to 4, 3 to 5, and 4 to 5). If activity 1 escalates and the FormStatus variable is set to 4, and then call the Finish method to expire the activity, would the flow move from 1 to 4, and color the line between 1 and 4?


 Thanks in advance for any reply or clarification you can provide 🙂

Badge +2

I too would like to have the lines between activities to be colored after an escalation occurs. If I may ask for some clarification on this. 


You are no longer using the GoToActivity in your Escalation Action Rule? But, are setting a DataField variable in which the line rule acts upon after you "finish" the current acitivty?


Hence, I could have a FormStatus variable that represents each of 5 activities from 1 to 5, each linked to all activities above it via lines based upon the FormStaus = n rule. (i.e. 1 linked to 2, 1 to 3, 1 to 4, 1 to 5, 2 to 3, 2 to 4, 2 to 5, 3 to 4, 3 to 5, and 4 to 5). If activity 1 escalates and the FormStatus variable is set to 4, and then call the Finish method to expire the activity, would the flow move from 1 to 4, and color the line between 1 and 4?


Thanks in advance for any reply or clarification you can provide 🙂

Badge +11

Hi Aitkeneh,


I do not think you would be able to 'Finish' an event from within an Escalation context.  I would (within the Escalation Action) make sure that the FormStatus variable is set to 4 and 'Expire' the current Activity - if I remember correctly, the call is something like: K2.ExpireActivity().  If you're line rule are then defined correctly, you should see the line from 1 to 4 colored.


HTH,


Ockert

Badge +2

Thanks for the quick reply Ockert. I'm going to try some of this today. But, before I do perhaps you can further clarify one more thing for me. Am I to expire the activity before I call the GoToActivity method, or expire after the goto?


Anyway, I'm going to try it without the GoTo to see what happens. My hope is that the line rule will pickup on the updated FormStatus variable and move on when the Activity is expired. I've already tried without expiring the Activity = the process doesn't move, as expected.


Thanks again, Jeff


 

Badge +13
GoToActivity will expire ALL parallel running activities, so you do not need to call ExpireActivity before or after using GotoActivity.

Reply