You are here

public static function MaestroEngine::getProcessIdFromQueueId in Maestro 8.2

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

Get the process ID from the Queue ID.

Parameters

int $queueID: The Maestro Queue ID.

Return value

int|bool Returns the process ID integer or FALSE on failure

15 calls to MaestroEngine::getProcessIdFromQueueId()
MaestroEngine::completeTask in src/Engine/MaestroEngine.php
CompleteTask Completes the queue record by setting the status bit to true/1.
MaestroEngine::doProductionAssignmentNotifications in src/Engine/MaestroEngine.php
Internal method to do production assignment notifications.
MaestroEngine::getTemplateTaskByQueueID in src/Engine/MaestroEngine.php
Returns the template task based on the task stored in the queue.
MaestroEngine::productionAssignments in src/Engine/MaestroEngine.php
Using the queueID, the task's machine name and the template machine name, we assign the task using the appropriate method defined in the template.
MaestroEngine::setProcessVariable in src/Engine/MaestroEngine.php
Set a process variable's value. Does a post-variable-set call to re-create any production assignments that may rely on this variable's value.

... See full list

File

src/Engine/MaestroEngine.php, line 308

Class

MaestroEngine
Class MaestroEngine.

Namespace

Drupal\maestro\Engine

Code

public static function getProcessIdFromQueueId($queueID) {
  $queueRecord = \Drupal::entityTypeManager()
    ->getStorage('maestro_queue')
    ->load($queueID);
  if ($queueRecord) {
    return $queueRecord->process_id
      ->getString();
  }
  return FALSE;
}