本文整理汇总了Java中org.camunda.bpm.model.cmmn.instance.Milestone类的典型用法代码示例。如果您正苦于以下问题:Java Milestone类的具体用法?Java Milestone怎么用?Java Milestone使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Milestone类属于org.camunda.bpm.model.cmmn.instance包,在下文中一共展示了Milestone类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerType
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Milestone.class, CMMN_ELEMENT_MILESTONE)
.namespaceUri(CMMN11_NS)
.extendsType(PlanItemDefinition.class)
.instanceProvider(new ModelTypeInstanceProvider<Milestone>() {
public Milestone newInstance(ModelTypeInstanceContext instanceContext) {
return new MilestoneImpl(instanceContext);
}
});
typeBuilder.build();
}
示例2: DefaultCmmnElementHandlerRegistry
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
public DefaultCmmnElementHandlerRegistry() {
// init definition element handler
definitionElementHandlers = new HashMap<Class<? extends CmmnElement>, CmmnElementHandler<? extends CmmnElement, ? extends CmmnActivity>>();
definitionElementHandlers.put(Case.class, caseHandler);
// init plan item element handler
planItemElementHandlers = new HashMap<Class<? extends PlanItemDefinition>, ItemHandler>();
planItemElementHandlers.put(Stage.class, stagePlanItemHandler);
planItemElementHandlers.put(CasePlanModel.class, casePlanModelHandler);
planItemElementHandlers.put(Task.class, taskPlanItemHandler);
planItemElementHandlers.put(HumanTask.class, humanTaskPlanItemHandler);
planItemElementHandlers.put(ProcessTask.class, processTaskPlanItemHandler);
planItemElementHandlers.put(DecisionTask.class, decisionTaskPlanItemHandler);
planItemElementHandlers.put(CaseTask.class, caseTaskPlanItemHandler);
planItemElementHandlers.put(Milestone.class, milestonePlanItemHandler);
// Note: EventListener is currently not supported!
// planItemElementHandlers.put(EventListener.class, eventListenerPlanItemHandler);
// init discretionary element handler
discretionaryElementHandlers = new HashMap<Class<? extends PlanItemDefinition>, ItemHandler>();
discretionaryElementHandlers.put(Stage.class, stageDiscretionaryItemHandler);
discretionaryElementHandlers.put(HumanTask.class, humanTaskDiscretionaryItemHandler);
}
示例3: setUp
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
@Before
public void setUp() {
milestone = createElement(casePlanModel, "aMilestone", Milestone.class);
planItem = createElement(casePlanModel, "PI_aMilestone", PlanItem.class);
planItem.setDefinition(milestone);
}
示例4: testListenerInvocation
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
@Deployment
public void testListenerInvocation() {
// Check if case definition has different key
assertEquals(0, repositoryService.createCaseDefinitionQuery().caseDefinitionKey("testCase").count());
assertEquals(0, repositoryService.createCaseDefinitionQuery().caseDefinitionKey("testCase-modified").count());
assertEquals(1, repositoryService.createCaseDefinitionQuery().caseDefinitionKey("testCase-modified-modified").count());
assertEquals(1, numberOfRegistered(Definitions.class));
assertEquals(1, numberOfRegistered(Case.class));
assertEquals(1, numberOfRegistered(CasePlanModel.class));
assertEquals(3, numberOfRegistered(HumanTask.class));
assertEquals(1, numberOfRegistered(ProcessTask.class));
assertEquals(1, numberOfRegistered(CaseTask.class));
assertEquals(1, numberOfRegistered(DecisionTask.class));
// 3x HumanTask, 1x ProcessTask, 1x CaseTask, 1x DecisionTask, 1x Task
assertEquals(7, numberOfRegistered(Task.class));
// 1x CasePlanModel, 1x Stage
assertEquals(2, numberOfRegistered(Stage.class));
assertEquals(1, numberOfRegistered(Milestone.class));
// Note: EventListener is currently not supported!
assertEquals(0, numberOfRegistered(EventListener.class));
assertEquals(3, numberOfRegistered(Sentry.class));
assertEquals(11, TestCmmnTransformListener.cmmnActivities.size());
assertEquals(24, TestCmmnTransformListener.modelElementInstances.size());
assertEquals(3, TestCmmnTransformListener.sentryDeclarations.size());
}
示例5: transformMilestone
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
@Override
public void transformMilestone(PlanItem planItem, Milestone milestone, CmmnActivity activity) {
addDelegateListener(activity);
}
示例6: transformMilestone
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
public void transformMilestone(PlanItem planItem, Milestone milestone, CmmnActivity activity) {
addListeners(activity);
}
示例7: transformMilestone
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
public void transformMilestone(PlanItem planItem, Milestone milestone, CmmnActivity activity) {
}
示例8: transformPlanItem
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
protected void transformPlanItem(PlanItem planItem, CmmnActivity parent) {
PlanItemDefinition definition = planItem.getDefinition();
ItemHandler planItemTransformer = null;
if (definition instanceof HumanTask) {
planItemTransformer = getPlanItemHandler(HumanTask.class);
} else if (definition instanceof ProcessTask) {
planItemTransformer = getPlanItemHandler(ProcessTask.class);
} else if (definition instanceof CaseTask) {
planItemTransformer = getPlanItemHandler(CaseTask.class);
} else if (definition instanceof DecisionTask) {
planItemTransformer = getPlanItemHandler(DecisionTask.class);
} else if (definition instanceof Task) {
planItemTransformer = getPlanItemHandler(Task.class);
} else if (definition instanceof Stage) {
planItemTransformer = getPlanItemHandler(Stage.class);
} else if (definition instanceof Milestone) {
planItemTransformer = getPlanItemHandler(Milestone.class);
} else if (definition instanceof EventListener) {
planItemTransformer = getPlanItemHandler(EventListener.class);
}
if (planItemTransformer != null) {
CmmnActivity newActivity = planItemTransformer.handleElement(planItem, context);
if (definition instanceof Stage) {
Stage stage = (Stage) definition;
transformStage(stage, newActivity);
context.setParent(parent);
} else if (definition instanceof HumanTask) {
HumanTask humanTask = (HumanTask) definition;
// According to the specification: A HumanTask can only contain
// one planningTable, the XSD allows multiple planningTables!
Collection<PlanningTable> planningTables = humanTask.getPlanningTables();
for (PlanningTable planningTable : planningTables) {
transformPlanningTable(planningTable, parent);
}
}
for (CmmnTransformListener transformListener : transformListeners) {
if (definition instanceof HumanTask) {
transformListener.transformHumanTask(planItem, (HumanTask) definition, newActivity);
} else if (definition instanceof ProcessTask) {
transformListener.transformProcessTask(planItem, (ProcessTask) definition, newActivity);
} else if (definition instanceof CaseTask) {
transformListener.transformCaseTask(planItem, (CaseTask) definition, newActivity);
} else if (definition instanceof DecisionTask) {
transformListener.transformDecisionTask(planItem, (DecisionTask) definition, newActivity);
} else if (definition instanceof Task) {
transformListener.transformTask(planItem, (Task) definition, newActivity);
} else if (definition instanceof Stage) {
transformListener.transformStage(planItem, (Stage) definition, newActivity);
} else if (definition instanceof Milestone) {
transformListener.transformMilestone(planItem, (Milestone) definition, newActivity);
} else if (definition instanceof EventListener) {
transformListener.transformEventListener(planItem, (EventListener) definition, newActivity);
}
}
}
}
示例9: transformMilestone
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
public void transformMilestone(PlanItem planItem, Milestone milestone, CmmnActivity caseActivity) {
addEventListenerOrMilestoneHandlers(caseActivity);
}
示例10: transformMilestone
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
public void transformMilestone(PlanItem planItem, Milestone milestone, CmmnActivity activity) {
modelElementInstances.add(planItem);
modelElementInstances.add(milestone);
cmmnActivities.add(activity);
}
示例11: setUp
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
@Before
public void setUp() {
milestone = createElement(casePlanModel, "aMilestone", Milestone.class);
planningTable = createElement(casePlanModel, "aPlanningTable", PlanningTable.class);
discretionaryItem = createElement(planningTable, "DI_aMilestone", DiscretionaryItem.class);
discretionaryItem.setDefinition(milestone);
}
示例12: transformMilestone
import org.camunda.bpm.model.cmmn.instance.Milestone; //导入依赖的package包/类
void transformMilestone(PlanItem planItem, Milestone milestone, CmmnActivity caseActivity);