You are here

public static function MaestroEngine::abortProcess in Maestro 8.2

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

This static method will load the maestro_process entity identified by the processID param and will flag it as aborted.

Parameters

int $processID: The Maestro Process ID.

File

src/Engine/MaestroEngine.php, line 547

Class

MaestroEngine
Class MaestroEngine.

Namespace

Drupal\maestro\Engine

Code

public static function abortProcess($processID) {
  $processRecord = \Drupal::entityTypeManager()
    ->getStorage('maestro_process')
    ->load($processID);
  $processRecord
    ->set('complete', PROCESS_STATUS_ABORTED);
  $processRecord
    ->set('completed', time());
  $processRecord
    ->save();
}