本文整理匯總了Java中org.activiti.engine.impl.jobexecutor.ProcessEventJobHandler類的典型用法代碼示例。如果您正苦於以下問題:Java ProcessEventJobHandler類的具體用法?Java ProcessEventJobHandler怎麽用?Java ProcessEventJobHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ProcessEventJobHandler類屬於org.activiti.engine.impl.jobexecutor包,在下文中一共展示了ProcessEventJobHandler類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initJobHandlers
import org.activiti.engine.impl.jobexecutor.ProcessEventJobHandler; //導入依賴的package包/類
protected void initJobHandlers() {
jobHandlers = new HashMap<>();
TimerExecuteNestedActivityJobHandler timerExecuteNestedActivityJobHandler = new TimerExecuteNestedActivityJobHandler();
jobHandlers.put(timerExecuteNestedActivityJobHandler.getType(), timerExecuteNestedActivityJobHandler);
TimerCatchIntermediateEventJobHandler timerCatchIntermediateEvent = new TimerCatchIntermediateEventJobHandler();
jobHandlers.put(timerCatchIntermediateEvent.getType(), timerCatchIntermediateEvent);
TimerStartEventJobHandler timerStartEvent = new TimerStartEventJobHandler();
jobHandlers.put(timerStartEvent.getType(), timerStartEvent);
AsyncContinuationJobHandler asyncContinuationJobHandler = new AsyncContinuationJobHandler();
jobHandlers.put(asyncContinuationJobHandler.getType(), asyncContinuationJobHandler);
ProcessEventJobHandler processEventJobHandler = new ProcessEventJobHandler();
jobHandlers.put(processEventJobHandler.getType(), processEventJobHandler);
TimerSuspendProcessDefinitionHandler suspendProcessDefinitionHandler = new TimerSuspendProcessDefinitionHandler();
jobHandlers.put(suspendProcessDefinitionHandler.getType(), suspendProcessDefinitionHandler);
TimerActivateProcessDefinitionHandler activateProcessDefinitionHandler = new TimerActivateProcessDefinitionHandler();
jobHandlers.put(activateProcessDefinitionHandler.getType(), activateProcessDefinitionHandler);
// if we have custom job handlers, register them
if (getCustomJobHandlers() != null) {
for (JobHandler customJobHandler : getCustomJobHandlers()) {
jobHandlers.put(customJobHandler.getType(), customJobHandler);
}
}
}
示例2: scheduleEventAsync
import org.activiti.engine.impl.jobexecutor.ProcessEventJobHandler; //導入依賴的package包/類
protected void scheduleEventAsync(Object payload) {
final CommandContext commandContext = Context.getCommandContext();
JobEntity message = new JobEntity();
message.setJobType(Job.JOB_TYPE_MESSAGE);
message.setRevision(1);
message.setJobHandlerType(ProcessEventJobHandler.TYPE);
message.setJobHandlerConfiguration(id);
message.setTenantId(getTenantId());
message.setProcessDefinitionId(getProcessDefinitionId());
message.setExecutionId(getExecutionId());
message.setProcessInstanceId(getProcessInstanceId());
if (Context.getProcessEngineConfiguration().getAsyncExecutor().isActive()) {
GregorianCalendar expireCal = new GregorianCalendar();
ProcessEngineConfiguration processEngineConfig = Context.getCommandContext().getProcessEngineConfiguration();
expireCal.setTime(processEngineConfig.getClock().getCurrentTime());
expireCal.add(Calendar.SECOND, processEngineConfig.getLockTimeAsyncJobWaitTime());
message.setLockExpirationTime(expireCal.getTime());
}
// TODO: support payload
// if(payload != null) {
// message.setEventPayload(payload);
// }
commandContext.getJobEntityManager().send(message);
}
示例3: scheduleEventAsync
import org.activiti.engine.impl.jobexecutor.ProcessEventJobHandler; //導入依賴的package包/類
protected void scheduleEventAsync(Serializable payload) {
final CommandContext commandContext = Context.getCommandContext();
MessageEntity message = new MessageEntity();
message.setJobHandlerType(ProcessEventJobHandler.TYPE);
message.setJobHandlerConfiguration(id);
// TODO: support payload
// if(payload != null) {
// message.setEventPayload(payload);
// }
commandContext.getJobManager().send(message);
}
示例4: scheduleEventAsync
import org.activiti.engine.impl.jobexecutor.ProcessEventJobHandler; //導入依賴的package包/類
protected void scheduleEventAsync(Serializable payload) {
final CommandContext commandContext = Context.getCommandContext();
MessageEntity message = new MessageEntity();
message.setJobHandlerType(ProcessEventJobHandler.TYPE);
message.setJobHandlerConfiguration(id);
// TODO: support payload
// if(payload != null) {
// message.setEventPayload(payload);
// }
commandContext.getJobEntityManager().send(message);
}