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


Java Stage类代码示例

本文整理汇总了Java中org.camunda.bpm.model.cmmn.instance.Stage的典型用法代码示例。如果您正苦于以下问题:Java Stage类的具体用法?Java Stage怎么用?Java Stage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Stage类属于org.camunda.bpm.model.cmmn.instance包,在下文中一共展示了Stage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createCaseWithOneStageAndNestedHumanTask

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
@Test
public void createCaseWithOneStageAndNestedHumanTask() {
  // create process
  Case caseInstance = createElement(definitions, "case-with-one-human-task", Case.class);

  // create case plan model
  CasePlanModel casePlanModel = createElement(caseInstance, "casePlanModel_1", CasePlanModel.class);

  // create a stage
  Stage stage = createElement(casePlanModel, "Stage_1", Stage.class);

  // create elements
  HumanTask humanTask = createElement(stage, "HumanTask_1", HumanTask.class);

  // create a plan item
  PlanItem planItem = createElement(stage, "PlanItem_1", PlanItem.class);

  // set definition to human task
  planItem.setDefinition(humanTask);
}
 
开发者ID:camunda,项目名称:camunda-cmmn-model,代码行数:21,代码来源:CreateModelTest.java

示例2: registerType

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(org.camunda.bpm.model.cmmn.instance.CasePlanModel.class, CMMN_ELEMENT_CASE_PLAN_MODEL)
    .namespaceUri(CMMN11_NS)
    .extendsType(Stage.class)
    .instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<CasePlanModel>() {
      public CasePlanModel newInstance(ModelTypeInstanceContext instanceContext) {
        return new CasePlanModel(instanceContext);
      }
    });

  typeBuilder.build();
}
 
开发者ID:camunda,项目名称:camunda-cmmn-model,代码行数:13,代码来源:CasePlanModel.java

示例3: registerType

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Stage.class, CMMN_ELEMENT_STAGE)
      .namespaceUri(CMMN11_NS)
      .extendsType(PlanFragment.class)
      .instanceProvider(new ModelTypeInstanceProvider<Stage>() {
        public Stage newInstance(ModelTypeInstanceContext instanceContext) {
          return new StageImpl(instanceContext);
        }
      });

  autoCompleteAttribute = typeBuilder.booleanAttribute(CMMN_ATTRIBUTE_AUTO_COMPLETE)
      .defaultValue(false)
      .build();

  exitCriteriaRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXIT_CRITERIA_REFS)
      .namespace(CMMN10_NS)
      .idAttributeReferenceCollection(Sentry.class, CmmnAttributeElementReferenceCollection.class)
      .build();

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  planningTableChild = sequenceBuilder.element(PlanningTable.class)
      .build();

  planItemDefinitionCollection = sequenceBuilder.elementCollection(PlanItemDefinition.class)
      .build();

  exitCriterionCollection = sequenceBuilder.elementCollection(ExitCriterion.class)
      .build();

  typeBuilder.build();
}
 
开发者ID:camunda,项目名称:camunda-cmmn-model,代码行数:33,代码来源:StageImpl.java

示例4: initializeAutoComplete

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
protected void initializeAutoComplete(CmmnElement element, CmmnActivity activity, CmmnHandlerContext context) {
  PlanItemDefinition definition = getDefinition(element);
  if (definition instanceof Stage) {
    Stage stage = (Stage) definition;
    activity.setProperty(PROPERTY_AUTO_COMPLETE, stage.isAutoComplete());
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:8,代码来源:StageItemHandler.java

示例5: DefaultCmmnElementHandlerRegistry

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的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);
  }
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:29,代码来源:DefaultCmmnElementHandlerRegistry.java

示例6: transformSentries

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
protected void transformSentries(Stage stage) {
  Collection<Sentry> sentries = stage.getSentrys();

  if (sentries != null && !sentries.isEmpty()) {
    SentryHandler handler = getSentryHandler();
    for (Sentry sentry : sentries) {
      handler.handleElement(sentry, context);
    }
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:11,代码来源:CmmnTransform.java

示例7: transformSentryOnParts

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
protected void transformSentryOnParts(Stage stage) {
  Collection<Sentry> sentries = stage.getSentrys();

  if (sentries != null && !sentries.isEmpty()) {
    SentryHandler handler = getSentryHandler();
    for (Sentry sentry : sentries) {
      handler.initializeOnParts(sentry, context);
      // sentry fully transformed -> call transform listener
      CmmnSentryDeclaration sentryDeclaration = context.getParent().getSentry(sentry.getId());
      for (CmmnTransformListener transformListener : transformListeners) {
        transformListener.transformSentry(sentry, sentryDeclaration);
      }
    }
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:16,代码来源:CmmnTransform.java

示例8: setUp

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
@Before
public void setUp() {
  stage = createElement(casePlanModel, "aStage", Stage.class);

  planItem = createElement(casePlanModel, "PI_aStage", PlanItem.class);
  planItem.setDefinition(stage);

}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:9,代码来源:StagePlanItemExecutionListenerHandlerTest.java

示例9: testListenerInvocation

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的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());
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:28,代码来源:CmmnTransformListenerTest.java

示例10: transformStage

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
@Override
public void transformStage(PlanItem planItem, Stage stage, CmmnActivity activity) {
  addDelegateListener(activity);
}
 
开发者ID:camunda,项目名称:camunda-bpm-reactor,代码行数:5,代码来源:RegisterAllCmmnTransformListener.java

示例11: transformStage

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
public void transformStage(PlanItem planItem, Stage stage, CmmnActivity activity) {
  addListeners(activity);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:MetricsCmmnTransformListener.java

示例12: transformStage

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
public void transformStage(PlanItem planItem, Stage stage, CmmnActivity activity) {
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:3,代码来源:AbstractCmmnTransformListener.java

示例13: transformStage

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
protected void transformStage(Stage stage, CmmnActivity parent) {

    context.setParent(parent);

    // transform a sentry with it ifPart (onParts will
    // not be transformed in this step)
    transformSentries(stage);

    // transform planItems
    transformPlanItems(stage, parent);

    // transform the onParts of the existing sentries
    transformSentryOnParts(stage);

    // parse planningTable (not yet implemented)
    transformPlanningTable(stage.getPlanningTable(), parent);

  }
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:19,代码来源:CmmnTransform.java

示例14: transformPlanItem

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的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);
      }
    }
  }
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:65,代码来源:CmmnTransform.java

示例15: transformStage

import org.camunda.bpm.model.cmmn.instance.Stage; //导入依赖的package包/类
public void transformStage(PlanItem planItem, Stage stage, CmmnActivity caseActivity) {
  addTaskOrStageHandlers(caseActivity);
}
 
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:4,代码来源:CmmnHistoryTransformListener.java


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