本文整理汇总了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);
}
}
}
}
示例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);
}
}
}
示例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();
}
}
}
}
示例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);
}
}
}
示例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();
}
}
}
}
示例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);
}
}
}
示例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);
}
}
}