You are here

public static function MaestroEngine::setTaskStatus in Maestro 3.x

Same name and namespace in other branches
  1. 8.2 src/Engine/MaestroEngine.php \Drupal\maestro\Engine\MaestroEngine::setTaskStatus()

SetTaskStatus Sets a task's status. Default is success.

Parameters

int $queueID: The Maestro Queue ID.

int $status: The status for this task (see defines in .module file)

4 calls to MaestroEngine::setTaskStatus()
MaestroContentTypeCompleteTask::submitForm in src/Form/MaestroContentTypeCompleteTask.php
Form submission handler.
MaestroInteractiveTask::handleExecuteSubmit in src/Plugin/EngineTasks/MaestroInteractiveTask.php
Interactive tasks, or tasks that signal themselves as requiring human interaction will have the resulting form submissions sent to their own handler for processing to determine if the task should be completed or not or to carry out any task processing…
MaestroWebformTask::handleExecuteSubmit in modules/maestro_webform/src/Plugin/EngineTasks/MaestroWebformTask.php
Interactive tasks, or tasks that signal themselves as requiring human interaction will have the resulting form submissions sent to their own handler for processing to determine if the task should be completed or not or to carry out any task processing…
maestro_form_approval_example_manager_approval_form_submit in modules/examples/maestro_form_approval_example/maestro_form_approval_example.module
This is the submit handler passed off to us from the Maestro Engine.

File

src/Engine/MaestroEngine.php, line 498

Class

MaestroEngine
Class MaestroEngine.

Namespace

Drupal\maestro\Engine

Code

public static function setTaskStatus($queueID, $status = TASK_STATUS_SUCCESS) {
  $queueRecord = \Drupal::entityTypeManager()
    ->getStorage('maestro_queue')
    ->load($queueID);
  $queueRecord
    ->set('status', $status);
  $queueRecord
    ->save();
}