Skip to main content

Hi All,


1>What happens when an activity is expired ?


2>What is the difference between Expiring an activity and finishing a Server Event?


Thanks and Regards

1.  It probably (someone confirms) ignores the succeeding rule and skips any other client/server events following the event that expires the activity, and proceeds to validate all the routing lines.

2.  Activity can have more than 1 server event.
 


From a reporting point of view in the workspace for example, the status of the Activity with be different: either Expired (and shown in Red in the ViewFlow) or Completed (shown in Green in the ViewFlow)


When you use the server event you could also set certain process and activity data relevant at that point before finishing the server event.


From a programming point of view, Expire can only be used in an Escalation Rule but a Server Event can be finished from any other external system.


In terms of the flow of your process, the result is the same the line rules of the lines flowing from that Activity are evaluated immediately after the expire or immediately after the last event in the Activity is finished.


 


Hi All,


 


Thanks a lot for replying.


Am I right if I say this :


An activity is expired; it means that the activity itself and its entire events are terminated.


A Server Event is finish, only this event is finished.


Thanks and Regards


Your statement sounds about right.


To elaborate on smidde's points about expiring through escalations.  This can be very useful in some situations and you can create line rules that handle an activity status of expired differently; say routing to a different next activity than if the Activity had been completed normally.


Best Regards.

Hi All,


Thanks a lot for replying.


Here I have a query :


In one activity, I am implementing Escalation to goto the next activity after 1 minute. I have used an async server event in the first activity and Goto Escalation(through GUI). When Escalation happens, control is transferred to the next activity.


But will the first activity expire on it's own or we have to expire it explictly through code in K2.


Thanks and Regards


Yes the Goto will expire this activity automatically.  In fact, anytime the GotoActivity method is used (the GotoActivity method is the API call that the Goto Escalation uses) it will expire ALL currently active activity instances for this process instance, not just this current one.  It will then jump to the Activity specified in the Goto command.  If this is not desirable, you can select the "Expire" option of the Goto escalation, which will simply expire this specific activity instance, at which point you can control where the process goes via a line rule that checks for K2.Activity.Stats = Expired.

Hi Bob,


Thanks a lot for replying.


Can I use both K2.ExpireActivity() and K2.GotoActivity() function in Escalation ? But I doubt whether it will be of any use.


Thanks and Regards


Although I've never tried it, I suppose if you wrote your own code within the escalation you may be able to.  That being said I don't know if there would be any issues with it.  Even if the code executed without problem I don't see a reason to ever doing this, as the Goto will expire the current and all other active activity instances, thus there should be no need for the ExpireActivity() call if you are using GotoActivity().

Reply