You are here

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

Same name and namespace in other branches
  1. 8.2 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 549

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();
}