The following method is a safe wrapper for waking up processes. The wrapper first checks the status of the process and branches accordingly in code.
- If the process is not a user process (origin<0) then do nothing
- If the process is a user process (origin>0) then perform the following actions:
- If the process is PAUSED the wrapper uses the command RESUME PROCESS to wake it up.
- If the process is DELAYED the wrapper uses the command DELAY PROCESS to wake it up.
| // wake up process properly|
If (Count parameters=1)
// only execute this against user created processes
// not a user created process = do nothing
// no parameters = do nothing
If the code above is saved as wakeUpProcess then it could be used like this: