@SuppressWarnings("deprecation") public void performOperationSync(AtomicOperation executionOperation) { if (requiresUnsuspendedExecution(executionOperation)) { ensureNotSuspended(); } Context.getCommandInvocationContext().performOperation(executionOperation, this); }
@SuppressWarnings("deprecation") public void performOperationSync(AtomicOperation executionOperation) { if (requiresUnsuspendedExecution(executionOperation)) { ensureNotSuspended(); } Context.getCommandInvocationContext().performOperation(executionOperation, this); }
@SuppressWarnings("deprecation") public void performOperation(AtomicOperation executionOperation) { boolean async = executionOperation.isAsync(this); if (!async && requiresUnsuspendedExecution(executionOperation)) { ensureNotSuspended(); } Context .getCommandInvocationContext() .performOperation(executionOperation, this, async); }
@SuppressWarnings("deprecation") public void performOperation(AtomicOperation executionOperation) { boolean async = executionOperation.isAsync(this); if (!async && requiresUnsuspendedExecution(executionOperation)) { ensureNotSuspended(); } Context .getCommandInvocationContext() .performOperation(executionOperation, this, async); }
public Void execute(CommandContext commandContext) { assertEquals(this, Context.getCommandInvocationContext().getCommand()); if (innerCommand != null) { CommandExecutor commandExecutor = Context.getProcessEngineConfiguration().getCommandExecutorTxRequired(); commandExecutor.execute(innerCommand); // should still be correct after command invocation assertEquals(this, Context.getCommandInvocationContext().getCommand()); } return null; }
public void rollback() { try { try { LOG.debugTransactionOperation("firing event rollback..."); fireTransactionEvent(TransactionState.ROLLINGBACK); } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugTransactionOperation("rolling back the persistence session..."); getPersistenceProvider().rollback(); } } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugFiringEventRolledBack(); fireTransactionEvent(TransactionState.ROLLED_BACK); } }
@Override protected void createHistoryCleanupJob(CommandContext commandContext) { monitor.sync(); super.createHistoryCleanupJob(commandContext); spy = Context.getCommandInvocationContext(); monitor.sync(); }
public void rollback() { try { try { LOG.debugTransactionOperation("firing event rollback..."); fireTransactionEvent(TransactionState.ROLLINGBACK); } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugTransactionOperation("rolling back the persistence session..."); getPersistenceProvider().rollback(); } } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugFiringEventRolledBack(); fireTransactionEvent(TransactionState.ROLLED_BACK); } }
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; } });
@Override public void execute(AsyncContinuationConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { LegacyBehavior.repairMultiInstanceAsyncJob(execution); PvmAtomicOperation atomicOperation = findMatchingAtomicOperation(configuration.getAtomicOperation()); ensureNotNull("Cannot process job with configuration " + configuration, "atomicOperation", atomicOperation); // reset transition id. String transitionId = configuration.getTransitionId(); if (transitionId != null) { PvmActivity activity = execution.getActivity(); TransitionImpl transition = (TransitionImpl) activity.findOutgoingTransition(transitionId); execution.setTransition(transition); } Context.getCommandInvocationContext() .performOperation(atomicOperation, execution); }
@Override public void execute(AsyncContinuationConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { LegacyBehavior.repairMultiInstanceAsyncJob(execution); PvmAtomicOperation atomicOperation = findMatchingAtomicOperation(configuration.getAtomicOperation()); ensureNotNull("Cannot process job with configuration " + configuration, "atomicOperation", atomicOperation); // reset transition id. String transitionId = configuration.getTransitionId(); if (transitionId != null) { PvmActivity activity = execution.getActivity(); TransitionImpl transition = (TransitionImpl) activity.findOutgoingTransition(transitionId); execution.setTransition(transition); } Context.getCommandInvocationContext() .performOperation(atomicOperation, execution); }
@SuppressWarnings("deprecation") public void performOperationSync(AtomicOperation executionOperation) { if (requiresUnsuspendedExecution(executionOperation)) { ensureNotSuspended(); } Context.getCommandInvocationContext().performOperation(executionOperation, this); }
@SuppressWarnings("deprecation") public void performOperation(AtomicOperation executionOperation) { boolean async = executionOperation.isAsync(this); if (!async && requiresUnsuspendedExecution(executionOperation)) { ensureNotSuspended(); } Context .getCommandInvocationContext() .performOperation(executionOperation, this, async); }
public Void execute(CommandContext commandContext) { assertEquals(this, Context.getCommandInvocationContext().getCommand()); if (innerCommand != null) { CommandExecutor commandExecutor = Context.getProcessEngineConfiguration().getCommandExecutorTxRequired(); commandExecutor.execute(innerCommand); // should still be correct after command invocation assertEquals(this, Context.getCommandInvocationContext().getCommand()); } return null; }
public void rollback() { try { try { LOG.debugTransactionOperation("firing event rollback..."); fireTransactionEvent(TransactionState.ROLLINGBACK); } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugTransactionOperation("rolling back the persistence session..."); getPersistenceProvider().rollback(); } } catch (Throwable exception) { LOG.exceptionWhileFiringEvent(TransactionState.ROLLINGBACK, exception); Context.getCommandInvocationContext().trySetThrowable(exception); } finally { LOG.debugFiringEventRolledBack(); fireTransactionEvent(TransactionState.ROLLED_BACK); } }
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; } });
@Override public void execute(AsyncContinuationConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { LegacyBehavior.repairMultiInstanceAsyncJob(execution); PvmAtomicOperation atomicOperation = findMatchingAtomicOperation(configuration.getAtomicOperation()); ensureNotNull("Cannot process job with configuration " + configuration, "atomicOperation", atomicOperation); // reset transition id. String transitionId = configuration.getTransitionId(); if (transitionId != null) { PvmActivity activity = execution.getActivity(); TransitionImpl transition = (TransitionImpl) activity.findOutgoingTransition(transitionId); execution.setTransition(transition); } Context.getCommandInvocationContext() .performOperation(atomicOperation, execution); }