/** * {@inheritdoc} */ public function executeCommand(ProcessEngine $engine) { $id = UUID::createRandom(); $execution = $engine->findExecution($this->executionId); $delegation = []; if ($this->nodeId !== NULL) { $delegation['nodeId'] = $this->nodeId; } $command = new SignalExecutionCommand($execution, NULL, [], $delegation); $job = $engine->scheduleJob($execution->getId(), AsyncCommandHandler::HANDLER_TYPE, [AsyncCommandHandler::PARAM_COMMAND => $command], new \DateTimeImmutable('@' . $this->time, new \DateTimeZone('UTC'))); $this->createSubscription($engine, $job); $engine->debug('{execution} subscribed to timer job <{job}>', ['execution' => (string) $execution, 'job' => $job === NULL ? 'NULL' : (string) $job->getId()]); return $id; }