Differences between Stop, Start and Sleep
A question that is sometimes asked is "what is the difference between stopping, starting and sleeeping within K2?".
Start and Stop reside at the Process Instance level and accessible via K2 Workspace Management tooling or SourceCode.Workflow.Management API (and thus require Admin permission). “Stop” will put an active process instance into a status of “Stop” which will prevent it from executing (meaning client events can’t be actioned, esclations won’t fire…). The process instance is still alive in the sense that it resides in the K2Server/transactgion database (as opposed to just K2ServerLog/reporting database). You can equate this to a “pause”. “Start” will essentially resume the process; kind of like pressing play after pausing a movie.
Sleep on the other hand is functionality available in the K2 Worklists or SourceCode.Workflow.Client API that operates at upon individual worklist item (NOT the process instance). When you sleep a worklist item it simply changes the status for that specific worklist item to a status of “Sleep”. When you sleep it you must give K2 a duration or specific datetime to awake it at so it doesn’t sleep forever. Thus, as I understand it Sleep does the following:
1. Changes status of worklistitem to “Sleep”
2. Will eventually be automatically be awoken by K2
So what does this mean? By default, the OOTB worklists like workspace and web part filter out worklist items in a status of sleep so they won’t appear until they are awoken. However you can change the filter to display these if you’d like. As for escalations, I don’t think Sleep has any impact on escalations. In my testing here activity and event escalations still fire for a worklist item I have in sleep.