Skip to main content
Hi,

[quote user= 4, continue to Act "C" after Act "B") and (If 'ActBDelay' >= 24, continue to Act "E" after Act "B").

If I'm misunderstanding your problem, please let me know.

Regards,
Ockert
Hi all,

I need some ideas on how to resolve this escalation issue.

From an activity "A", users have the possibility to choose the delay for the next activitity (activity "B") through radio option buttons. possible choices include 4hr, 24hr, 48hr and 72hr.

The escalations for activity "B" should then be:

If delay time for activity "B" exceeds 4hr (where delay was selected from activity "A"), the process should continu to activitiy "C" which, afterwards, will continu on activity "E".

If delay time for activity "B" exceeds 24hr or 48hr or 72hr (where delay was selected from activity "A"), the process should continu to activity "D" which, afterwards, will continu on activity "E".

Any idea would be appreciated,

Thanks,
Thanks Ockert,

Being a newbi at escalations the part where to set up the escalation rule needs some clarification.

"you set the Escalation Rule to fire at 'Start of Activity' + 'ActBDelay' hours"

Can you give some kind of "step-by-step"? Can I use the escalation rule template "Goto" for this? If so, does this mean I can use the "Escalate On:" and check the "Date:" option and choose the "ActBDelay" process field? This is the area where I am a little confused.

I have no problem in defining the different line rules afterwards and the delay value is also in a process field as suggested by you.

Thanks,
Depends on what you want to do in Activity "B" - Is it merely acting as a delay mechanism? If so, then yes, I would use a Goto Escalation which 'Escalates after' the chosen duration. To make it easier, put in 4 hours in the wizard page and generate the code behind the Escalation rule to change the '4' hours to 'K2.ProcessInstance.Datafields("ActBDelay").Value' hours. On the next wizard page, select 'Expire Activity' instead of 'Goto Activity'.

Hope this helps,
Ockert
One thing I forgot to mention... Activity "B", a part those escalation rules that route the process to Activity "C" or "D", the normal route should follow the following path: Activity "B" to activity "E".

Following your suggestion, how will I define the default (standard) route from Activity "B"? I would be tempted to not put any rule, but then I would have a parallele route since from Activity "B", when the user clicks on "Submit" the process would then take the default route and also one of the two escalation routes, 'cause the user from Activity "A" would have chosen a delay for Activity "B".

Hope you understand my issue!

Thanks,
LineRule from "B" to "C":
If 'ActBDelay' = 4, follow this route

LineRule from "B" to "D":
If 'ActBDelay' >= 24, follow this route

LineRule from "B" to "E" (Default Line):
If 'ActBDelay' is not set OR ('ActBDelay' < 24 AND 'ActBDelay' <> 4), follow this route

HTH,
Ockert
Thanks Okert for the effort and help.

I finally got it working... Not exactly the way you suggested but close.

I inserted some code in both the escalation and action rule as follow:

Escalation rule:
Sub Main(Byval K2 as EscalationRuleContext)
Dim Days As Integer = 0
Dim Hours as integer = 0
Dim Minutes as integer = 0
Dim Seconds As Integer
Dim LeadTime As Integer


LeadTime = CInt(SourceCode.K2Utilities.XMLFieldMod.GetXMLValue(K2.ProcessInstance.XmlFields("K2InfoPathSchema").Value,"my:mesChamps/my:LeadTimeChoice"))
Hours = LeadTime

K2.SetEscalationRule(Days, Hours, Minutes, Seconds,1)
End sub

Where the "LeadTime" variable is set to whatever has been chosen by the user.

Action rule:
Sub Main(Byval K2 as EscalationActionContext)
Dim LeadTime As Integer

LeadTime = CInt(SourceCode.K2Utilities.XMLFieldMod.GetXMLValue(K2.ProcessInstance.XmlFields("K2InfoPathSchema").Value,"my:mesChamps/my:LeadTimeChoice"))

If LeadTime = 4 Then
K2.GotoActivity("Exp-DelayRush(B)")
Else
K2.GotoActivity("Exp-Delay1(B)")
End If
End sub

Where an "If" condition evaluates the chosen value and determines to which activity to go next. Of course if the activity is completed before the delays, it just follows it's normal route.

I've been testing and works fine. Is this the best way of doing it? Don't know but it is giving us the wanted result.

Thanks,

Reply