Skip to content

Commit

Permalink
fix: update dependencies and text intermediate timers
Browse files Browse the repository at this point in the history
  • Loading branch information
bingo-soft committed Dec 25, 2023
1 parent 8e58d03 commit 4821028
Show file tree
Hide file tree
Showing 101 changed files with 352 additions and 312 deletions.
5 changes: 5 additions & 0 deletions LOG.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*** Service (0) executed at 2023-12-25T11:56:20+03:00
*** Service (0) executed at 2023-12-25T12:12:01+03:00
*** Service (0) executed at 2023-12-25T12:13:14+03:00
*** Service (0) executed at 2023-12-25T12:14:15+03:00
*** Service (0) executed at 2023-12-25T12:15:35+03:00
290 changes: 153 additions & 137 deletions composer.lock

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions examples/QuickStart/EngineStarterService/src/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ public function run(): void
} catch (\Throwable $throwable) {
fwrite(STDERR, $throwable->getMessage() . PHP_EOL);
exit(1);
} catch (\Exception $exception) {
fwrite(STDERR, $exception->getMessage() . PHP_EOL);
exit(1);
}
}
}
2 changes: 1 addition & 1 deletion src/Application/Impl/EmbeddedProcessApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function execute(callable $callable)
{
try {
return $callable();
} catch (\Exception $e) {
} catch (\Throwable $e) {
fwrite(STDERR, $e->getMessage() . "\n");
//throw LOG.processApplicationExecutionException(e);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Commons/Logging/BaseLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function createLogger($loggerClass, $projectCode, ?string $name, ?
$logger->componentId = $componentId;
$logger->delegateLogger = new ExtLogger($name);
return $logger;
} catch (\Exception $e) {
} catch (\Throwable $e) {
fwrite(STDERR, sprintf("Unable to instantiate logger '%s'", $loggerClass) . "\n");
throw new \Exception(sprintf("Unable to instantiate logger '%s'", $loggerClass));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/AbstractQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ protected function evaluateExpressions(): void
try {
$method = $this->getMethod($methodName);
$method->invoke($this, $value);
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw new ProcessEngineException("Unable to access method '" . $methodName . "' on class '" . get_class($this) . "'", $e);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Impl/Application/ProcessApplicationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected function createJobExecutorRegistrations(array $deploymentIds): void

$registeredDeployments = &Context::getProcessEngineConfiguration()->getRegisteredDeployments();
$registeredDeployments = array_merge($registeredDeployments, $deploymentIds);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//throw LOG.exceptionWhileRegisteringDeploymentsWithJobExecutor(e);
throw new \Exception("exceptionWhileRegisteringDeploymentsWithJobExecutor");
}
Expand All @@ -126,7 +126,7 @@ protected function removeJobExecutorRegistrations(array $deploymentIds): void
unset($registeredDeployments[$id]);
}
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
//LOG.exceptionWhileUnregisteringDeploymentsWithJobExecutor(e);
throw new \Exception("exceptionWhileUnregisteringDeploymentsWithJobExecutor");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/BootstrapEngineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ protected function databaseInstallationId(CommandContext $commandContext): ?stri
try {
$installationIdProperty = $commandContext->getPropertyManager()->findPropertyById(self::INSTALLATION_PROPERTY_NAME);
return $installationIdProperty !== null ? $installationIdProperty->getValue() : null;
} catch (\Exception $e) {
} catch (\Throwable $e) {
//LOG.couldNotSelectInstallationId(e.getMessage());
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Bpmn/Behavior/AbstractBpmnActivityBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected function executeWithErrorPropagation(ActivityExecutionInterface $execu
if (is_callable($toExecute)) {
$toExecute();
}
} catch (\Exception $ex) {
} catch (\Throwable $ex) {
if ($activityInstanceId == $execution->getActivityInstanceId()) {
try {
BpmnExceptionHandler::propagateException($execution, $ex);
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Bpmn/Behavior/CallableElementActivityBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected function invokeVarMappingDelegation(DelegateInvocation $delegation): v
{
try {
Context::getProcessEngineConfiguration()->getDelegateInterceptor()->handleInvocation($delegation);
} catch (\Exception $ex) {
} catch (\Throwable $ex) {
throw new ProcessEngineException($ex->getMessage(), $ex);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Bpmn/Behavior/ShellActivityBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function execute(/*ActivityExecutionInterface*/$execution): void
$execution->setVariable($this->errorCodeVariableStr, intval($errorCode));
}
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
//throw LOG.shellExecutionException(e);
throw $e;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Impl/Bpmn/Diagram/ProcessDiagramLayoutFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function parseXml($bpmnXmlStream): DomDocumentExt
try {
$meta = stream_get_meta_data($bpmnXmlStream);
$bpmnModel->loadXML(fread($bpmnXmlStream, filesize($meta['uri'])));
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw new ProcessEngineException("Error while parsing BPMN model.", $e);
}
return $bpmnModel;
Expand Down Expand Up @@ -162,7 +162,7 @@ protected function getDiagramBoundsFromImage($resource, int $offsetTop = 0, int
try {
$meta = stream_get_meta_data($resource);
$image = (new PImage())->read($meta['uri']);
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw new ProcessEngineException("Error while reading process diagram image.", $e);
}
$diagramBoundsImage = $this->getDiagramBoundsFromImage($image, $offsetTop, $offsetBottom);
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Bpmn/Helper/BpmnExceptionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function isFulfilled($element = null): bool
return $this->errorDeclarationFinder->getErrorEventDefinition() !== null || $element === null;
}
});
} catch (\Exception $e) {
} catch (\Throwable $e) {
//LOG.errorPropagationException(execution.getActivityInstanceId(), e);

// separate the exception handling to support a fail-safe error propagation
Expand Down
8 changes: 4 additions & 4 deletions src/Impl/Bpmn/Parser/BpmnParse.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ protected function getImporter(?string $importType, Element $theImport): ?XMLImp
$newInstance = new CxfWSDLImporter();
$this->importers[$importType] = $newInstance;
return $newInstance;
} catch (\Exception $e) {
} catch (\Throwable $e) {
$this->addError("Could not find importer for type " . $importType, $theImport);
}
}
Expand Down Expand Up @@ -615,7 +615,7 @@ public function parseProcess(Element $processElement): ProcessDefinitionEntity
try {
$historyTimeToLive = $processElement->attributeNS(self::BPMN_EXTENSIONS_NS_PREFIX, "historyTimeToLive", Context::getProcessEngineConfiguration()->getHistoryTimeToLive());
$processDefinition->setHistoryTimeToLive(ParseUtil::parseHistoryTimeToLive($historyTimeToLive));
} catch (\Exception $e) {
} catch (\Throwable $e) {
$this->addError(new BpmnParseException($e->getMessage(), $processElement, $e));
}

Expand Down Expand Up @@ -2534,7 +2534,7 @@ protected function parsePriority(Element $element, ?string $priorityAttribute):
// constant values must be valid integers
try {
$value = intval($priorityAttributeValue);
} catch (\Exception $e) {
} catch (\Throwable $e) {
$this->addError("Value '" . $priorityAttributeValue . "' for attribute '" . $priorityAttribute . "' is not a valid number", $element);
}
}
Expand Down Expand Up @@ -4896,7 +4896,7 @@ public function parseDoubleAttribute(Element $element, ?string $attributeName, ?
} else {
try {
return floatval($doubleText);
} catch (\Exception $e) {
} catch (\Throwable $e) {
$this->addError("Cannot parse " . $attributeName . ": " . $e->getMessage(), $element);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Calendar/CycleBusinessCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function resolveDuedate(?string $duedateDescription, $startDate = null, i
$cron = new CronExpression($duedateDescription);
return $cron->getNextRunDate($startDate ?? ClockUtil::getCurrentTime(...$args));
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
//throw LOG.exceptionWhileParsingCronExpresison(duedateDescription, e);
throw $e;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Calendar/DueDateBusinessCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function resolveDuedate(?string $duedateDescription, $startDate = null, i
} else {
return new \DateTime($duedateDescription);
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw $e;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Calendar/DurationBusinessCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public function resolveDuedate(?string $duedateDescription, $startDate = null, i
try {
$dh = new DurationHelper($duedateDescription, $startDate);
return $dh->getDateAfter($startDate);
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw $e;
}
}
Expand Down
13 changes: 6 additions & 7 deletions src/Impl/Cfg/ProcessEngineConfigurationImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ protected function initHistoryTimeToLive(): void
{
try {
ParseUtil::parseHistoryTimeToLive($this->historyTimeToLive);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//throw LOG.invalidPropertyValue("historyTimeToLive", historyTimeToLive, e);
throw new \Exception("historyTimeToLive");
}
Expand All @@ -1378,7 +1378,7 @@ protected function initBatchOperationsHistoryTimeToLive(): void
{
try {
ParseUtil::parseHistoryTimeToLive($this->batchOperationHistoryTimeToLive);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//throw LOG.invalidPropertyValue("batchOperationHistoryTimeToLive", batchOperationHistoryTimeToLive, e);
throw new \Exception("batchOperationHistoryTimeToLive");
}
Expand All @@ -1393,7 +1393,7 @@ protected function initBatchOperationsHistoryTimeToLive(): void
}
try {
ParseUtil::parseHistoryTimeToLive($timeToLive);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//throw LOG.invalidPropertyValue("history time to live for " + batchOperation + " batch operations", timeToLive, e);
throw new \Exception("history time to live ...");
}
Expand Down Expand Up @@ -1747,7 +1747,6 @@ protected function initDataSource(): void
'pdo_pgsql' => [
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
\PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_ASSOC,
\PDO::ATTR_EMULATE_PREPARES => true,
UnpooledDataSource::RECONNECT_ATTEMPTS_OPTION => 5,
UnpooledDataSource::RECONNECT_DELAY_OPTION => 1
]
Expand Down Expand Up @@ -1807,14 +1806,14 @@ public function initDatabaseType(): void
//LOG.debugDatabaseType(databaseType);

//$this->initDatabaseVendorAndVersion(databaseMetaData);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//LOG.databaseConnectionAccessException(e);
} finally {
/*try {
if ($connection !== null) {
$connection->close();
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
//LOG.databaseConnectionCloseException(e);
}*/
}
Expand Down Expand Up @@ -1878,7 +1877,7 @@ protected function initSqlSessionFactory(): void
if ($this->isUseSharedSqlSessionFactory) {
$this->cachedSqlSessionFactory = $this->sqlSessionFactory;
}
/*} catch (\Exception $e) {
/*} catch (\Throwable $e) {
throw new ProcessEngineException("Error while building ibatis SqlSessionFactory: " . $e->getMessage());
} finally {
IoUtil::closeSilently($inputStream);
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Cmd/CreateMigrationPlanCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ protected function getProcessDefinition(CommandContext $commandContext, ?string
try {
return $commandContext->getProcessEngineConfiguration()
->getDeploymentCache()->findDeployedProcessDefinitionById($id);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//throw LOG.processDefinitionDoesNotExist(id, type);
throw new \Exception("processDefinitionDoesNotExist");
}
Expand Down
4 changes: 2 additions & 2 deletions src/Impl/Cmd/DefaultJobRetryCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function execute(CommandContext $commandContext, ...$args)
} else {
try {
$this->executeCustomStrategy($commandContext, $job, $activity);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//LOG.debugFallbackToDefaultRetryStrategy();
$this->executeStandardStrategy($commandContext);
}
Expand Down Expand Up @@ -166,7 +166,7 @@ protected function getFailedJobRetryTimeCycle(JobEntity $job, ?ExpressionInterfa

try {
$value = $expression->getValue($execution, $execution);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//LOG.exceptionWhileParsingExpression(jobId, e.getCause().getMessage());
}

Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Cmd/DeleteDeploymentCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function execute(CommandContext $commandContext, ...$args)
} finally {
try {
$commandContext->getTransactionContext()->addTransactionListener(TransactionState::ROLLED_BACK, $listener);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//TX_LOG.debugTransactionOperation("Could not register transaction synchronization. Probably the TX has already been rolled back by application code.");
$listener->execute($commandContext);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Cmd/DeleteHistoricVariableInstanceCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function execute(CommandContext $commandContext, ...$args)
}/*elseif ($variable.getCaseDefinitionId() !== null) {
definition = commandContext.getProcessEngineConfiguration().getDeploymentCache().findDeployedCaseDefinitionById(variable.getCaseDefinitionId());
}*/
} catch (\Exception $nve) {
} catch (\Throwable $nve) {
// definition has been deleted already
}
$commandContext->getOperationLogManager()->logHistoricVariableOperation(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function execute(CommandContext $commandContext, ...$args)
$definition = $commandContext->getProcessEngineConfiguration()->getDeploymentCache()->findDeployedProcessDefinitionById(
$instance->getProcessDefinitionId()
);
} catch (\Exception $nve) {
} catch (\Throwable $nve) {
// definition has been deleted already
}
$commandContext->getOperationLogManager()->logHistoricVariableOperation(
Expand Down
11 changes: 6 additions & 5 deletions src/Impl/Cmd/DeleteProcessDefinitionsByIdsCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,12 @@ protected function deleteProcessDefinitions(ProcessDefinitionGroup $group): void
$configuration = Context::getProcessEngineConfiguration();
$deploymentCache = $configuration->getDeploymentCache();
$newLatestProcessDefinition = $deploymentCache->resolveProcessDefinition($newLatestProcessDefinition);

$deployers = $configuration->getDeployers();
foreach ($deployers as $deployer) {
if ($deployer instanceof BpmnDeployer) {
$deployer->addEventSubscriptions($newLatestProcessDefinition);
if ($newLatestProcessDefinition !== null) {
$deployers = $configuration->getDeployers();
foreach ($deployers as $deployer) {
if ($deployer instanceof BpmnDeployer) {
$deployer->addEventSubscriptions($newLatestProcessDefinition);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Cmd/DeployCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ protected function registerWithJobExecutor(CommandContext $commandContext, Deplo
);
try {
$commandContext->getTransactionContext()->addTransactionListener(TransactionState::ROLLED_BACK, $listener);
} catch (\Exception $e) {
} catch (\Throwable $e) {
//TX_LOG.debugTransactionOperation("Could not register transaction synchronization. Probably the TX has already been rolled back by application code.");
$listener->execute($commandContext);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Cmd/ExecuteJobsCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function execute(CommandContext $commandContext, ...$args)
$commandContext->registerCommandContextListener($this->jobFailureCollector);
$commandContext->setCurrentJob($job);
$job->execute($commandContext, ...$args);
} catch (\Exception $t) {
} catch (\Throwable $t) {
$failedActivityId = Context::getCommandInvocationContext()
->getProcessDataContext()
->getLatestActivityId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function resolveTypedValues(array &$variableUpdates): void
if ($this->shouldFetchValue($entity)) {
try {
$entity->getTypedValue(false);
} catch (\Exception $t) {
} catch (\Throwable $t) {
// do not fail if one of the variables fails to load
//LOG.exceptionWhileGettingValueForVariable(t);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Cmd/SaveTaskCmd.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function execute(CommandContext $commandContext, ...$args)
$this->task->insert();
$operation = UserOperationLogEntryInterface::OPERATION_TYPE_CREATE;
$this->task->executeMetrics(Metrics::ACTIVTY_INSTANCE_START, $commandContext);
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw new NotValidException($e->getMessage(), $e);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Impl/Context/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ public static function executeWithinProcessApplication($callback, ProcessApplica
$wrappedCallback = new ProcessApplicationClassloaderInterceptor($callback);
// execute wrapped callback
return $processApplication->execute($wrappedCallback, $invocationContext);
} catch (\Exception $e) {
} catch (\Throwable $e) {
// unwrap exception
throw new ProcessEngineException("Unexpected exeption while executing within process application ", $e);
} finally {
self::removeCurrentProcessApplication();
}
} catch (\Exception $e) {
} catch (\Throwable $e) {
throw new ProcessEngineException("Cannot switch to process application '" . $paName . "' for execution: " . $e->getMessage(), $e);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Core/Operation/AbstractEventAtomicOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function execute(CoreExecution $execution, ...$args): void

try {
$execution->invokeListener($listener);
} catch (\Exception $ex) {
} catch (\Throwable $ex) {
$this->eventNotificationsFailed($execution, $ex);
// do not continue listener invocation once a listener has failed
return;
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Db/EntityManager/Cache/DbEntityCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function get(?string $type, ?string $id = null)
}
try {
return $dbEntity;
} catch (\Exception $e) {
} catch (\Throwable $e) {
//throw LOG.entityCacheLookupException(type, id, dbEntity.getClass(), e);
throw new \Exception("entityCacheLookupException");
}
Expand Down
2 changes: 1 addition & 1 deletion src/Impl/Db/EntityManager/DbEntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ protected function flushDbOperations(
$flushResult = null;
try {
$flushResult = $this->persistenceSession->executeDbOperations($operationsToFlush);
} catch (\Exception $e) {
} catch (\Throwable $e) {
// Top level persistence exception
//throw LOG.flushDbOperationUnexpectedException(allOperations, e);
throw new \Exception("flushDbOperationUnexpectedException");
Expand Down
Loading

0 comments on commit 4821028

Please sign in to comment.