use of org.camunda.bpm.engine.impl.jobexecutor.JobHandlerConfiguration in project camunda-bpm-platform by camunda.
the class JobEntity method execute.
public void execute(CommandContext commandContext) {
if (executionId != null) {
ExecutionEntity execution = getExecution();
ensureNotNull("Cannot find execution with id '" + executionId + "' referenced from job '" + this + "'", "execution", execution);
}
// initialize activity id
getActivityId();
// increment sequence counter before job execution
incrementSequenceCounter();
preExecute(commandContext);
JobHandler jobHandler = getJobHandler();
JobHandlerConfiguration configuration = getJobHandlerConfiguration();
ensureNotNull("Cannot find job handler '" + jobHandlerType + "' from job '" + this + "'", "jobHandler", jobHandler);
jobHandler.execute(configuration, execution, commandContext, tenantId);
postExecute(commandContext);
}
use of org.camunda.bpm.engine.impl.jobexecutor.JobHandlerConfiguration in project camunda-bpm-platform by camunda.
the class AbstractSetStateCmd method scheduleSuspensionStateUpdate.
protected void scheduleSuspensionStateUpdate(CommandContext commandContext) {
TimerEntity timer = new TimerEntity();
JobHandlerConfiguration jobHandlerConfiguration = getJobHandlerConfiguration();
timer.setDuedate(executionDate);
timer.setJobHandlerType(getDelayedExecutionJobHandlerType());
timer.setJobHandlerConfigurationRaw(jobHandlerConfiguration.toCanonicalString());
commandContext.getJobManager().schedule(timer);
}
Aggregations