Skip to main content
Can someone please tell me how can I expire an activity or an event from k2Rom ???
You could call GoToActivity method on the current worklist item to expire the current Activity and start the specified Activity. There is some more information on the K2ROM.dll documentation on the portal site. However, the GotoActivity call will also expire all other Activity instances in that process instance. If you have Activities running in parallel at this point in the process, it is unlikely this approach will work.
Check K2ROM help file on Finish method.
If System.Convert.ToBoolean(K2.ProcessInstance.DataFields("Expire").Value.ToString())=True Then

K2.Synchronous = False
K2.ExpireActivity("Events")

Else
K2.Synchronous = True

End If
:)
You are doing that from K2Studio server side events, originally you mentioned you wanted to do it from K2ROM.

While on this topic, if we have an activity that has these events, and we expire the activity while it's in Client Event, does Server Event1 get skipped?

Client Event
Server Event1
icon-quote.gifPeter Yao:


While on this topic, if we have an activity that has these events, and we expire the activity while it's in Client Event, does Server Event1 get skipped?

Client Event
Server Event1


The second event will not run.
I'm doing that from K2Studio server side events but I'm passing the "expire" field from the K2Rom. I used this method to facilitate the work.
Thanks for ...

Reply