public List<HistoricProcessInstance> getRunningHistoricProcessInstances(Date startedAfter, Date startedAt, int maxResults) { return commandExecutor.execute( new OptimizeRunningHistoricProcessInstanceQueryCmd(startedAfter, startedAt, maxResults) ); }
@Override public String getHistoricExternalTaskLogErrorDetails(String historicExternalTaskLogId) { return commandExecutor.execute(new GetHistoricExternalTaskLogErrorDetailsCmd(historicExternalTaskLogId)); } }
/** * Purges the database and the deployment cache. */ public PurgeReport purge() { return commandExecutor.execute(new PurgeDatabaseAndCacheCmd()); }
public List<HistoricProcessInstance> getCompletedHistoricProcessInstances(Date finishedAfter, Date finishedAt, int maxResults) { return commandExecutor.execute( new OptimizeCompletedHistoricProcessInstanceQueryCmd(finishedAfter, finishedAt, maxResults) ); }
private void deleteHistoryCleanupJobs() { final List<Job> jobs = historyService.findHistoryCleanupJobs(); for (final Job job: jobs) { processEngineConfiguration.getCommandExecutorTxRequired().execute(new Command<Void>() { public Void execute(CommandContext commandContext) { commandContext.getJobManager().deleteJob((JobEntity) job); return null; } }); } }
@Override public void suspend() { validateParameters(); SuspendJobCmd command = new SuspendJobCmd(this); commandExecutor.execute(command); }
@Override public void activate() { validateParameters(); ActivateJobCmd command = new ActivateJobCmd(this); commandExecutor.execute(command); }
@SuppressWarnings("unchecked") public List<U> list() { this.resultType = ResultType.LIST; if (commandExecutor!=null) { return (List<U>) commandExecutor.execute(this); } return evaluateExpressionsAndExecuteList(Context.getCommandContext(), null); }
@Override public void send() { if (executionId != null && isTenantIdSet) { throw LOG.exceptionDeliverSignalToSingleExecutionWithTenantId(); } SignalEventReceivedCmd command = new SignalEventReceivedCmd(this); commandExecutor.execute(command); }
@Override public void messageEventReceived(String messageName, String executionId, Map<String, Object> processVariables) { ensureNotNull("messageName", messageName); commandExecutor.execute(new MessageEventReceivedCmd(messageName, executionId, processVariables)); }
@Override public void suspend() { validateParameters(); SuspendJobDefinitionCmd command = new SuspendJobDefinitionCmd(this); commandExecutor.execute(command); }
public void run() { try { processEngineConfiguration .getCommandExecutorTxRequired() .execute(new ControlledCommand(this, new CompleteTaskCmd(taskId, null))); } catch (OptimisticLockingException e) { this.exception = e; } }
private void verifyByteArraysWereRemoved(final String... errorDetailsByteArrayIds) { engineRule.getProcessEngineConfiguration().getCommandExecutorTxRequired().execute(new Command<Void>() { public Void execute(CommandContext commandContext) { for (String errorDetailsByteArrayId : errorDetailsByteArrayIds) { assertNull(commandContext.getDbEntityManager().selectOne("selectByteArray", errorDetailsByteArrayId)); } return null; } }); }
public DecisionRequirementsDefinition getDecisionRequirementsDefinition(String decisionRequirementsDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDecisionRequirementsDefinitionCmd(decisionRequirementsDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DecisionDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@Override public void run() { try { processEngineConfiguration.getCommandExecutorTxRequired() .execute(new ControlledCommand<Void>(activeThread, createSuspendJobCommand())); } catch (OptimisticLockingException e) { this.exception = e; } LOG.debug(getName()+" ends"); }
public CmmnModelInstance getCmmnModelInstance(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCmmnModelInstanceCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CmmnModelInstanceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public InputStream getCaseModel(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCaseModelCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public void run() { try { processEngineConfiguration .getCommandExecutorTxRequired() .execute(new ControlledCommand(activeThread, new CompleteTaskCmd(taskId, null))); } catch (OptimisticLockingException e) { this.exception = e; } LOG.debug(getName()+" ends"); } }
@After public void deleteJobs() { for(final Job job : managementService.createJobQuery().list()) { processEngineConfiguration.getCommandExecutorTxRequired().execute(new Command<Void>() { public Void execute(CommandContext commandContext) { ((JobEntity) job).delete(); return null; } }); } }
@Test public void testBatchBinary() { // when helper.migrateProcessInstancesAsync(15); String byteArrayValueId = ((BatchEntity) managementService.createBatchQuery().singleResult()).getConfiguration(); ByteArrayEntity byteArrayEntity = configuration.getCommandExecutorTxRequired() .execute(new GetByteArrayCommand(byteArrayValueId)); checkBinary(byteArrayEntity); }