try { if (commandInvocationContext.getThrowable() == null) { fireCommandContextClose(); flushSessions(); if (commandInvocationContext.getThrowable() == null) { transactionContext.commit(); if (commandInvocationContext.getThrowable() != null) { fireCommandFailed(commandInvocationContext.getThrowable()); if (shouldLogInfo(commandInvocationContext.getThrowable())) { LOG.infoException(commandInvocationContext.getThrowable()); else if (shouldLogFine(commandInvocationContext.getThrowable())) { LOG.debugException(commandInvocationContext.getThrowable()); LOG.errorException(commandInvocationContext.getThrowable());
try { if (commandInvocationContext.getThrowable() == null) { fireCommandContextClose(); flushSessions(); if (commandInvocationContext.getThrowable() == null) { transactionContext.commit(); if (commandInvocationContext.getThrowable() != null) { fireCommandFailed(commandInvocationContext.getThrowable()); if (shouldLogInfo(commandInvocationContext.getThrowable())) { LOG.infoException(commandInvocationContext.getThrowable()); else if (shouldLogFine(commandInvocationContext.getThrowable())) { LOG.debugException(commandInvocationContext.getThrowable()); LOG.errorException(commandInvocationContext.getThrowable());
public Object execute(CommandContext commandContext) { CommandExecutor commandExecutor = Context.getProcessEngineConfiguration().getCommandExecutorTxRequired(); try { commandExecutor.execute(innerCommand); fail("exception expected to pop up during execution of inner command"); } catch (IdentifiableRuntimeException e) { // happy path assertNull("the exception should not have been propagated to this command's context", Context.getCommandInvocationContext().getThrowable()); } return null; } });
public void testConcurrentHistoryCleanupJobReconfigurationExecution() throws InterruptedException { getProcessEngine().getHistoryService().cleanUpHistoryAsync(true); ThreadControl thread1 = executeControllableCommand(new ControllableJobExecutionCommand()); thread1.reportInterrupts(); thread1.waitForSync(); ControllableProcessEngineBootstrapCommand bootstrapCommand = new ControllableProcessEngineBootstrapCommand(); ThreadControl thread2 = executeControllableCommand(bootstrapCommand); thread2.reportInterrupts(); thread2.waitForSync(); thread1.makeContinue(); thread1.waitForSync(); thread2.makeContinue(); Thread.sleep(2000); thread1.waitUntilDone(); thread2.waitForSync(); thread2.waitUntilDone(true); assertNull(thread1.getException()); assertNull(thread2.getException()); assertNull(bootstrapCommand.getContextSpy().getThrowable()); assertNotNull(ProcessEngines.getProcessEngines().get(PROCESS_ENGINE_NAME)); }
try { if (commandInvocationContext.getThrowable() == null) { fireCommandContextClose(); flushSessions(); if (commandInvocationContext.getThrowable() == null) { transactionContext.commit(); if (commandInvocationContext.getThrowable() != null) { fireCommandFailed(commandInvocationContext.getThrowable()); if (shouldLogInfo(commandInvocationContext.getThrowable())) { LOG.infoException(commandInvocationContext.getThrowable()); else if (shouldLogFine(commandInvocationContext.getThrowable())) { LOG.debugException(commandInvocationContext.getThrowable()); LOG.errorException(commandInvocationContext.getThrowable());
public Object execute(CommandContext commandContext) { CommandExecutor commandExecutor = Context.getProcessEngineConfiguration().getCommandExecutorTxRequired(); try { commandExecutor.execute(innerCommand); fail("exception expected to pop up during execution of inner command"); } catch (IdentifiableRuntimeException e) { // happy path assertNull("the exception should not have been propagated to this command's context", Context.getCommandInvocationContext().getThrowable()); } return null; } });