- ⌂ System Task
- Methods
- Static Methods
SystemTask::set_canceled()
Attempts to set the state of the System Task to canceling.
Prototype
boolean set_canceled()
Return
Returns TRUE if the System Task state could be changed to canceling. Otherwise FALSE.
Example
/**
 * Check an HTTP request to see if we should cancel a process,
 * and then gracefully cancel the process if requested.
 */
$request = new \io_comand_web\request();
if($request->get('cancel')) {
    $task_oid = $request->get('toid');
    $repo = comand::repo();
    $task = $repo->get_object_by_oid($task_oid, 'SystemTask');
    if($task && $task->Title == 'My Process') {
        $task->set_canceled();
    }
}
 webCOMAND Docs
webCOMAND Docs API Reference
API Reference PHP API
PHP API io_comand_systemtask
io_comand_systemtask