You are here

public function MaestroInteractiveTask::execute in Maestro 8.2

Same name and namespace in other branches
  1. 3.x src/Plugin/EngineTasks/MaestroInteractiveTask.php \Drupal\maestro\Plugin\EngineTasks\MaestroInteractiveTask::execute()

Part of the ExecutableInterface Execution of the interactive task does nothing except for setting the run_once flag .

Overrides ExecutableInterface::execute

File

src/Plugin/EngineTasks/MaestroInteractiveTask.php, line 83

Class

MaestroInteractiveTask
Maestro Interactive Task Plugin.

Namespace

Drupal\maestro\Plugin\EngineTasks

Code

public function execute() {

  // Need to set the run_once flag here
  // as interactive tasks are executed and completed by the user using the Maestro API.
  $queueRecord = \Drupal::entityTypeManager()
    ->getStorage('maestro_queue')
    ->load($this->queueID);
  $queueRecord
    ->set('run_once', 1);
  $queueRecord
    ->save();
  return FALSE;
}