Skip to main content
Say I have a task ("A") that when completes produces 2 tasks for 2 different users.

One activity is "B" and one is "C".

The user who has task "B" appear in their worklist does nothing about it.

The other user completes activity "C".

I want K2 to then automatically complete task "B" even though the other user never did anything, or started the form attached to task "B" etc.

How can I in code force Activity B to finish?
I need some help with this as well.

The closest thing I found in the KO namespace is ServerEventContext.ExpireActivity which is supposed to take an activity name and expire all the InstanceDestinations, however it seems to just expire the activity in which the ServerEventContext lives no matter what you pass it.

The only other way I can think of is to use the K2ROM and a ServerItem to Finish the activity, however I can't seem to access the classes in K2ROM from within the workflow so it would require an external DLL.

Is there a better way to do this that's accessible from within the workflow?

Reply