I have a parallel workflow, each task activity has 3 outcomes Approve, Minor Reject, Major reject. Approve and Minor Reject will go to individual workflow path so there is no dependency between multiple paths. Major Reject should update overall status as Rejected and need to complete workflow. Because this workflow has different paths in parallel, Major reject in one path is not completing the workflow.
I added Server Event(Code) to Major Reject activity and written following code. After writing this code I am not able to edit remaining tasks which I think all these pending activities are expired nicely as expected but workflow status is still in "In Progress". I want this to be in Completed status. How to do that?
K2.Synchronous = true/false;
K2.GotoActivity(
"Major Reject", true);
=========================================================================
foreach(ActivityInstance oActInst in K2.ProcessInstance.ActivityInstances)
{
if (oActInst.Activity.Name != "Major Reject")
{
K2.ExpireActivity(oActInst.Activity.Name);
}
}
Thanks for your time.
Kiran Batta.