當前位置: 首頁>>代碼示例>>Java>>正文


Java ProcessEventJobHandler類代碼示例

本文整理匯總了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);
        }
    }
}
 
開發者ID:flowable,項目名稱:flowable-engine,代碼行數:31,代碼來源:ProcessEngineConfigurationImpl.java

示例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);
    }
 
開發者ID:flowable,項目名稱:flowable-engine,代碼行數:30,代碼來源:EventSubscriptionEntity.java

示例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);
  }
 
開發者ID:iotsap,項目名稱:FiWare-Template-Handler,代碼行數:16,代碼來源:EventSubscriptionEntity.java

示例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);
  }
 
開發者ID:springvelocity,項目名稱:xbpm5,代碼行數:16,代碼來源:EventSubscriptionEntity.java


注:本文中的org.activiti.engine.impl.jobexecutor.ProcessEventJobHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。