public function createTask($action, $parameters, $recall = false , $label = null , $type = null)
    {
        if ($recall) {
            \common_Logger::w("Repeated call of action'; Execution canceled.");
            return false;
        }
        $task = new SyncTask($action, $parameters);
        $task->setLabel($label);
        $task->setType($type);
        $this->getPersistence()->add($task);
        $this->runTask($task);
        return $task;
    }
public function createTask($action, $parameters, $recall = false , $label = null , $type = null)
    {
        if ($recall) {
            \common_Logger::w("Repeated call of action'; Execution canceled.");
            return false;
        }
        $task = new SyncTask($action, $parameters);
        $task->setLabel($label);
        $task->setType($type);
        $this->getPersistence()->add($task);
        $this->runTask($task);
        return $task;
    }
public function createTask ( $ action , $ parameters , $ recall = false , $ label = null , $ type = null ) { if ( $ recall ) { \ common_Logger :: w ( "Repeated call of action'; Execution canceled." ) ; return false ; } $ task = new SyncTask ( $ action , $ parameters ) ; $ task -> setLabel ( $ label ) ; $ task -> setType ( $ type ) ; $ this -> getPersistence ( ) -> add ( $ task ) ; $ this -> runTask ( $ task ) ; return $ task ; }
Create and run task

@deprecated since version 7.10.0, to be removed in 8.0.

@param \oat\oatbox\action\Action|string $action action instance, classname or callback function
@param array $parameters parameters to be passed to the action
@param boolean $recall Parameter which indicates that task has been created repeatedly after fail of previous.
For current implementation in means that the second call will not be executed to avoid loop.
@param null|string $label
@param null|string $type
@return SyncTask
Create and run task