当前位置: 首页>>代码示例>>Java>>正文


Java TimerDeclarationImpl.prepareTimerEntity方法代码示例

本文整理汇总了Java中org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl.prepareTimerEntity方法的典型用法代码示例。如果您正苦于以下问题:Java TimerDeclarationImpl.prepareTimerEntity方法的具体用法?Java TimerDeclarationImpl.prepareTimerEntity怎么用?Java TimerDeclarationImpl.prepareTimerEntity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl的用法示例。


在下文中一共展示了TimerDeclarationImpl.prepareTimerEntity方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addTimerDeclarations

import org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected void addTimerDeclarations(ProcessDefinitionEntity processDefinition, List<TimerJobEntity> timers) {
    List<TimerDeclarationImpl> timerDeclarations = (List<TimerDeclarationImpl>) processDefinition.getProperty(BpmnParse.PROPERTYNAME_START_TIMER);
    if (timerDeclarations != null) {
        for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
            TimerJobEntity timer = timerDeclaration.prepareTimerEntity(null);
            if (timer != null) {
                timer.setProcessDefinitionId(processDefinition.getId());

                // Inherit timer (if applicable)
                if (processDefinition.getTenantId() != null) {
                    timer.setTenantId(processDefinition.getTenantId());
                }
                timers.add(timer);
            }
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:19,代码来源:BpmnDeployer.java

示例2: initialize

import org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void initialize() {
  log.fine("initializing "+this);

  ScopeImpl scope = getScope();
  ensureParentInitialized();

  List<VariableDeclaration> variableDeclarations = (List<VariableDeclaration>) scope.getProperty(BpmnParse.PROPERTYNAME_VARIABLE_DECLARATIONS);
  if (variableDeclarations!=null) {
    for (VariableDeclaration variableDeclaration : variableDeclarations) {
      variableDeclaration.initialize(this, parent);
    }
  }
  
  List<TimerDeclarationImpl> timerDeclarations = (List<TimerDeclarationImpl>) scope.getProperty(BpmnParse.PROPERTYNAME_TIMER_DECLARATION);
  if (timerDeclarations!=null) {
    for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
      TimerEntity timer = timerDeclaration.prepareTimerEntity(this);
      Context
        .getCommandContext()
        .getJobManager()
        .schedule(timer);
    }
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:26,代码来源:ExecutionEntity.java

示例3: initialize

import org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void initialize() {
    LOGGER.debug("initializing {}", this);

    ScopeImpl scope = getScopeObject();
    ensureParentInitialized();

    // initialize the lists of referenced objects (prevents db queries)
    variableInstances = new HashMap<>();
    eventSubscriptions = new ArrayList<>();

    // Cached entity-state initialized to null, all bits are zero, indicating NO entities present
    cachedEntityState = 0;

    List<TimerDeclarationImpl> timerDeclarations = (List<TimerDeclarationImpl>) scope.getProperty(BpmnParse.PROPERTYNAME_TIMER_DECLARATION);
    if (timerDeclarations != null) {
        for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
            TimerJobEntity timer = timerDeclaration.prepareTimerEntity(this);
            if (timer != null) {
                callJobProcessors(JobProcessorContext.Phase.BEFORE_CREATE, timer, Context.getProcessEngineConfiguration());
                Context.getCommandContext().getJobEntityManager().schedule(timer);
            }
        }
    }

    // create event subscriptions for the current scope
    List<EventSubscriptionDeclaration> eventSubscriptionDeclarations = (List<EventSubscriptionDeclaration>) scope.getProperty(BpmnParse.PROPERTYNAME_EVENT_SUBSCRIPTION_DECLARATION);
    if (eventSubscriptionDeclarations != null) {
        for (EventSubscriptionDeclaration eventSubscriptionDeclaration : eventSubscriptionDeclarations) {
            if (!eventSubscriptionDeclaration.isStartEvent()) {
                EventSubscriptionEntity eventSubscriptionEntity = eventSubscriptionDeclaration.prepareEventSubscriptionEntity(this);
                if (getTenantId() != null) {
                    eventSubscriptionEntity.setTenantId(getTenantId());
                }
                eventSubscriptionEntity.insert();
            }
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:41,代码来源:ExecutionEntity.java

示例4: addTimerDeclarations

import org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
private void addTimerDeclarations(ProcessDefinitionEntity processDefinition) {
  List<TimerDeclarationImpl> timerDeclarations = (List<TimerDeclarationImpl>) processDefinition.getProperty(BpmnParse.PROPERTYNAME_START_TIMER);
  if (timerDeclarations!=null) {
    for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
      TimerEntity timer = timerDeclaration.prepareTimerEntity(null);
      Context
        .getCommandContext()
        .getJobManager()
        .schedule(timer);
    }
  }
}
 
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:14,代码来源:BpmnDeployer.java

示例5: initialize

import org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void initialize() {
  log.debug("initializing {}", this);

  ScopeImpl scope = getScopeObject();
  ensureParentInitialized();

  // initialize the lists of referenced objects (prevents db queries)
  variableInstances = new HashMap<String, VariableInstanceEntity>();
  eventSubscriptions = new ArrayList<EventSubscriptionEntity>();
  jobs = new ArrayList<JobEntity>();
  tasks = new ArrayList<TaskEntity>();
  
  // Cached entity-state initialized to null, all bits are zore, indicating NO entities present
  cachedEntityState = 0;
  
  List<TimerDeclarationImpl> timerDeclarations = (List<TimerDeclarationImpl>) scope.getProperty(BpmnParse.PROPERTYNAME_TIMER_DECLARATION);
  if (timerDeclarations!=null) {
    for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
      TimerEntity timer = timerDeclaration.prepareTimerEntity(this);
      Context
        .getCommandContext()
        .getJobEntityManager()
        .schedule(timer);        
    }
  }
  
  // create event subscriptions for the current scope
  List<EventSubscriptionDeclaration> eventSubscriptionDeclarations = (List<EventSubscriptionDeclaration>) scope.getProperty(BpmnParse.PROPERTYNAME_EVENT_SUBSCRIPTION_DECLARATION);
  if(eventSubscriptionDeclarations != null) {
    for (EventSubscriptionDeclaration eventSubscriptionDeclaration : eventSubscriptionDeclarations) {        
      if(!eventSubscriptionDeclaration.isStartEvent()) {
        EventSubscriptionEntity eventSubscriptionEntity = eventSubscriptionDeclaration.prepareEventSubscriptionEntity(this);        
        eventSubscriptionEntity.insert();
      }        
    }
  }
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:39,代码来源:ExecutionEntity.java

示例6: addTimerDeclarations

import org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
protected void addTimerDeclarations(ProcessDefinitionEntity processDefinition) {
  List<TimerDeclarationImpl> timerDeclarations = (List<TimerDeclarationImpl>) processDefinition.getProperty(BpmnParse.PROPERTYNAME_START_TIMER);
  if (timerDeclarations!=null) {
    for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
      TimerEntity timer = timerDeclaration.prepareTimerEntity(null);
      timer.setProcessDefinitionId(processDefinition.getId());
      Context
        .getCommandContext()
        .getJobEntityManager()
        .schedule(timer);
    }
  }
}
 
开发者ID:springvelocity,项目名称:xbpm5,代码行数:15,代码来源:BpmnDeployer.java

示例7: initialize

import org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public void initialize() {
  log.fine("initializing "+this);

  ScopeImpl scope = getScope();
  ensureParentInitialized();

  List<VariableDeclaration> variableDeclarations = (List<VariableDeclaration>) scope.getProperty(BpmnParse.PROPERTYNAME_VARIABLE_DECLARATIONS);
  if (variableDeclarations!=null) {
    for (VariableDeclaration variableDeclaration : variableDeclarations) {
      variableDeclaration.initialize(this, parent);
    }
  }
  
  List<DataObject> dataObjects = (List<DataObject>) scope.getDataObjects();
  if (dataObjects != null) {
  	for (DataObject dataObject : dataObjects) {
  		setVariable(dataObject.getName(), null);
  	}
  }
  
  
  List<TimerDeclarationImpl> timerDeclarations = (List<TimerDeclarationImpl>) scope.getProperty(BpmnParse.PROPERTYNAME_TIMER_DECLARATION);
  if (timerDeclarations!=null) {
    for (TimerDeclarationImpl timerDeclaration : timerDeclarations) {
      TimerEntity timer = timerDeclaration.prepareTimerEntity(this);
      Context
        .getCommandContext()
        .getJobManager()
        .schedule(timer);
    }
  }
  
  List<SignalEventDefinition> signalDefinitions = (List<SignalEventDefinition>) scope.getProperty(BpmnParse.PROPERTYNAME_SIGNAL_DEFINITION_NAME);
  if(signalDefinitions != null) {
    for (SignalEventDefinition signalDefinition : signalDefinitions) {
      SignalEventSubscriptionEntity signalEventSubscriptionEntity = new SignalEventSubscriptionEntity(this);
      signalEventSubscriptionEntity.setEventName(signalDefinition.getSignalName());    
      if(signalDefinition.getActivityId() != null) {
        ActivityImpl activity = getActivity().findActivity(signalDefinition.getActivityId());
        signalEventSubscriptionEntity.setActivity(activity);
      }
      Context 
        .getCommandContext()
        .getEventSubscriptionManager()
        .insert(signalEventSubscriptionEntity);
    }
  }
}
 
开发者ID:iotsap,项目名称:FiWare-Template-Handler,代码行数:50,代码来源:ExecutionEntity.java


注:本文中的org.activiti.engine.impl.jobexecutor.TimerDeclarationImpl.prepareTimerEntity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。