Hi,
I have seen this behaviour if the code moved away (goto) or expiry the activity "First Review", while K2 was executing server event "Check Destination" and there was a client event following in the activity.
The reason why the "Wait for action" is still active is being:
When K2 is attempting to GOTO another activity, it also moved to the "Wait for Action" event. After it is planned, it will remain active even the process has moved on to the other activity.
To work around, we need to modify the code in the "check Destination" event from:
if (SearchManager() == "")  // if we cannot find suitable managers , return false Â
  {
       K2.GoToActivity("NameOfNextActivity");
  }
  else
  {Â
      K2.ProcessInstance.DataFields "Dest"].Value = SearchManager();
    }Â
Â
TO
if (SearchManager() == "")  // if we cannot find suitable managers , return false Â
  {Â
     K2.Synchronous = false;   // Stop here after Goto statement
      K2.GoToActivity("NameOfNextActivity");Â
         }
  else
  {Â
      K2.Synchronous = true; // Continue to next event when finished
      K2.ProcessInstance.DataFieldst"Dest"].Value = SearchManager();
    }Â
 Â
That's good info. Do you know if the similiar workaround needs to be done in BlackPearl?
Thank,
 We will try this, but I have another question regarding this issue.
Is there a way to code a function (only availlable to administrators) that close all active activities & events of a prosess?
I need that because we have about 10 process that are shown as active in our intranet but all activities are closed.
We cannot move into these process again (GOTO) because "offical documents" are créated with time stamp and cannot be updated again.
Â
regards,
 Frederic.
Using the Admin tool you could delete the workitem without removing log and that'll change it to Completed status.
And How?
In the K2 service manager i can just redirect a workitem to anothoer user.
An in the workspace, I could see my worklist but not the worklist of other users.
(I see all worklist items as "availllable", but not "open" ...)
Â
The delete function is only available from within that process.
Go to Processes, expand, select the process, Instances icon, find it, and click on icon for delete.  Do not check off delete log.