Skip to main content

Hi,


We have a straneg issue with a process (in k2.net 2003).
When we look to the activityintance list of a process, all activities are completed or expired.
And if an activity is expired, we use the GOTOActivity to go to the next activity.


After the last activity is reached, the process won't close (the status is still "Active")!

We found an "Active Event" in the process.
We try to perform a gotoactivity to the last activity instance, but without result,
the "Wait for action" event of the "First review (Manager customer relation)" remain active (see screen shot below).


So my question is Why this event remain active, even after a goto the last activity

And... 


How to force all Active event instance or all active activity instance to finish?


Thanks
K2ActiList.gif


K2ActiDetail.gif

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.


thanks

Reply