EXCEPTIONS


Badge +9

Hi All,


 High Priority Post.


I have to implement the following case :


Based on the value of a Process Data Field , Escalation should fire and a worklist should be created.


I designed a process having Activity1 and Activity2.


Activity1 has a server event , where I need to initiate the escalation by checking the value of  the process datafiled. Activity2 has a client event. If escalation occurs, then Control is transferred to Activity2 from Activity1.


I am unable to implement the condition.


Pls REPLY ASAP


Thanks in Advance.


10 replies

Badge +9

Hi All ,


The topic of discussion is "ESCALATION" and not "EXCEPTIONS".


I aplogize for the typing mistake.


Thanks and Regards

Badge +9

Hi All,


 Can this solve the problem effectively :


This code should be written behind the code for Escalation Rule:


public void Main(EscalationRuleContext K2)
{
 int Days = 0;
 int Hours = 0;
 int Minutes = 0;
 int Seconds = 120;
 
 if(Convert.ToBoolean(K2.ProcessInstance.DataFields["EscalationStart"].Value))
  K2.SetEscalationRule(Days, Hours, Minutes, Seconds,0);


and we will make The Server Event as asynchronous.

Badge +8

Yip, you got it. That will work.


But, if you make the server event async, something will have to do a call back with that even't serial number to finish the server event, will it be possible in your solution to just put the escalation code above in your Activity 2 with the client event?


 

Badge +9
Hi smiddie
Badge +9

Hi smiddie ,


Thanks a lot for replying.


In the escalation rule in Activity1 , I have written the code. And as U suggested, Activity2 comes after Activity1. But I could not get your point of using the serial number to finish the event.


Please explain ASAP.


Thanks and Regards.

Badge +6
'
Badge +6

Dear 'SourceCode' -


I have noticed you are expecting immediate replies by including 'respond ASAP' in you posts in the K2 Underground.


This is a community forum, not an official suport system.


- If you need immediate assistance, please open an official K2 Support ticket (www.portal.k2workflow.com) to get your more urgent needs responded to.


- If you constantly have 'ASAP' needs, you may want to adjust your development timelines to not be so tight to allow more time for forum replies.


Otherwise, you can omit the "ASAP" criteria from your postings, some may find it being rude by expecting attention ahead of others posting questions.


Thanks.


 


 


 

Badge +9

Hi dhall4biz,


I apologize sincerely to all for my mistake.


Thanks and Regards.


 

Badge +8

If you make a server event Asyncronous, it will execute the code in the server event, but it will remain Active. Thus, the Activity which holds this server event will also remain Active. The server event will remain active until an external call (using K2ROM) is made to the server event with Connection.OpenServerItem(sn), this method has the event serial number as a required field, if you don't have it you can't open the server item and you can't finish it.


For your application, I would just have the Activity 2 with the escalation code and not Activity 1 with the escalation code and async server event, you will have to explain to me why this would not work in your specific case.


 

Badge +9

Hi All,


 Pls consider the following :


I have to implement the following.


As soon as a process is triggered ,  a timer starts. Within 2 days from the moment the timer starts, if an external response is received then the timer should stop else another process should be called .


What I have planned is to implement Escalation along with IPC.


Pls guide me as to how should I do ?


URGENT!! 


Thanks and Regards

Reply