Conditional (Non-time related) Escalations

  • 1 October 2005
  • 3 replies
  • 1 view

Badge +5
Working on an InfoPath integrated solution. We're designing a "save as draft" method in our process, which simply returns the drafted form to the user's worklist. This is done by looping int the current activity as long as the user doesn't explicitly submit the form.

We are looking into escalations, and would like them not to fire when the form is in the draft mode. I've attempted to play around with escalation rule code: what I figured out is if the line
K2.SetEscalationRule()
is not executed, the escalation is fired immediately. Obviously, I could go and set the escalation period for the draft condition to like 1000 years, but it doesn't seem like an elegant solution.

Any suggestions? Thanks in advance.

3 replies

Badge +11
Once an Escalation has been defined on an Activity, IT WILL FIRE - either immediately (even if no 'SetEscalationRule' method was called) or some time in future. If the date and time of Escalation is set to fire earlier than the current date and time, an exception will be thrown.

You'll need to apply your conditional logic into the Escalation Action rather than in the Escalation Rule.

Hope this helps,
Ockert
Badge +5
Thanks Ockert.
Through trial & error, I've determined that if one is using a Redirect template for the escalations, any condition checking that is to stop the redirect from occuring needs to be done before
K2.Redirect = true;

If the code is moved below that line, the activity simply expires uncontrollably...
Badge +13

Does BlackPearl work differently on this case?

Currently I set a condition within theĀ  Escalation Action but the history will show that the escalation was fired.

I wonder if it's better by setting it to a year from now on which might degrade server performance over time if there are too many of these outstanding escalations for server to check?

Reply