You are here

public static function MaestroEngine::getTemplateIdFromProcessId in Maestro 8.2

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

Get the template's machine name from the process ID.

Parameters

int $processID: Maestro Process ID.

Return value

string Returns the template machine name or FALSE on error.

16 calls to MaestroEngine::getTemplateIdFromProcessId()
MaestroAndTask::execute in src/Plugin/EngineTasks/MaestroAndTask.php
Part of the ExecutableInterface Execution of the AND task returns TRUE when all pointers are complete and FALSE when still waiting.. .
MaestroEngine::cleanQueue in src/Engine/MaestroEngine.php
CleanQueue method This is the core method used by the orchestrator to move the process forward and to determine assignments and next steps.
MaestroEngine::getTemplateTaskByQueueID in src/Engine/MaestroEngine.php
Returns the template task based on the task stored in the queue.
MaestroEngine::nextStep in src/Engine/MaestroEngine.php
NextStep Engine method that determines which is the next step based on the current step and does all assignments as necessary.
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 187

Class

MaestroEngine
Class MaestroEngine.

Namespace

Drupal\maestro\Engine

Code

public static function getTemplateIdFromProcessId($processID) {
  $processRecord = FALSE;
  if ($processID) {
    $processRecord = \Drupal::entityTypeManager()
      ->getStorage('maestro_process')
      ->load($processID);
  }
  if ($processRecord) {
    return $processRecord->template_id
      ->getString();
  }
  return FALSE;
}