| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function execute(JobHandlerConfigurationInterface $configuration, ExecutionEntity $execution, CommandContext $commandContext, ?string $tenantId): void |
||
| 26 | { |
||
| 27 | $batchId = $configuration->getBatchId(); |
||
| 28 | $batch = $commandContext->getBatchManager()->findBatchById($configuration->getBatchId()); |
||
| 29 | EnsureUtil::ensureNotNull("Batch with id '" . $this->batchId . "' cannot be found", "batch", $batch); |
||
| 30 | |||
| 31 | $batchJobHandler = $commandContext |
||
| 32 | ->getProcessEngineConfiguration() |
||
| 33 | ->getBatchHandlers() |
||
| 34 | ->get($batch->getType()); |
||
| 35 | |||
| 36 | $done = $batchJobHandler->createJobs($batch); |
||
| 37 | |||
| 38 | if (!$done) { |
||
| 39 | $batch->createSeedJob(); |
||
| 40 | } else { |
||
| 41 | // create monitor job initially without due date to |
||
| 42 | // enable rapid completion of simple batches |
||
| 43 | $batch->createMonitorJob(false); |
||
| 44 | } |
||
| 57 |