Can't wake up sleeping worklist items

  • 25 November 2010
  • 3 replies
  • 0 views

Badge +1

We have put several tasks to sleep, and now it seems like impossible to wake them up again. Tried to reset the sleeping time to 1 sec, but the task seems to be totally in coma.


Help?


3 replies

Userlevel 4
Badge +14

As far as I know there is no way to wake a sleeping item before the initial sleep period expires. You can try releasing the item via the API….it might work but no guarantee.


For Example:

foreach (WorklistItem worklistItem in connection.OpenWorklist())
{
// open the worklist item
connection.OpenWorklistItem(worklistItem.SerialNumber);
if (worklistItem != null && worklistItem.SerialNumber ==_wfSerialNumber)
{
worklistItem.Release();
}
}


HTH


Vernon

Userlevel 4
Badge +14

Release will make the item status Available for all destinations again and the Client API had a Sleep with flag false and true which will wake the item as well and keep the status as open.


IE:



             using (SourceCode.Workflow.Client.Connection conn = new SourceCode.Workflow.Client.Connection())
            {
                conn.Open("localhost");


                SourceCode.Workflow.Client.WorklistItem wli = conn.OpenWorklistItem("15_8");
               
                wli.ProcessInstance.Update();


                wli.Sleep(false);
            }


Badge

using (SourceCode.Workflow.Client.Connection conn = new SourceCode.Workflow.Client.Connection())
            {
                conn.Open("localhost");


                SourceCode.Workflow.Client.WorklistItem wli = conn.OpenWorklistItem("15_8");
               
                wli.ProcessInstance.Update();


                wli.Sleep(false);
            }


In the above  wli.ProcessInstance.Update(); throws an error if the process is in sleep status:so just remove the update() function , the reactivate ( awake ) will work.


 


it is working for us:)


 


 

Reply