Skip to main content

Hi,


We have 3 parallel flows.


1. User Activity   2 . User Actvity  3. Mail Event scheduled to run on a particular date.


When user clicks on Terminate Button. The 1st user activity and mail event activity should be completed without executing them and wait for 2nd user activity to complete


How do we achieve this. Please help


Thanks,


Shilpa

Hi Shilpa,


You can use a Server Event (Code) and use the expire activity method with the name of the activiy you want to stop.  You may want to enclose this within a try catch because if the activity does not exist the process instance will fail in error.




K2.ExpireActivity(



"Name of Activity");


Hope this help


Dominic




Hi,


Thanks for your response. We need to call ExpireActivity from web application which is  asp.net C# web application in our case. Can you let me know the code to use ExpireActivity from asp.net and not from K2 ServerItemContext?


Thanks,


Shilpa


Hi,


When you mention in your question,


When user clicks on Terminate Button.



How is this action linked to your process that has the parralel task? Is the Terminate one of the action?


 


Hi,


Can we use GotoActivity for serverevenitem? I want to goto finish activity from server event too. How to achive this. Terminate is not set as action for any event. I am going to use GotoActivity for worklistitem.


Thanks,


Shilpa


Reply