Search in sources :

Example 1 with PlanFragment

use of org.camunda.bpm.model.cmmn.instance.PlanFragment in project camunda-cmmn-model by camunda.

the class PlanFragmentImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(PlanFragment.class, CMMN_ELEMENT_PLAN_FRAGMENT).namespaceUri(CMMN11_NS).extendsType(PlanItemDefinition.class).instanceProvider(new ModelTypeInstanceProvider<PlanFragment>() {

        public PlanFragment newInstance(ModelTypeInstanceContext instanceContext) {
            return new PlanFragmentImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    planItemCollection = sequenceBuilder.elementCollection(PlanItem.class).build();
    sentryCollection = sequenceBuilder.elementCollection(Sentry.class).build();
    typeBuilder.build();
}
Also used : PlanItemDefinition(org.camunda.bpm.model.cmmn.instance.PlanItemDefinition) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) PlanFragment(org.camunda.bpm.model.cmmn.instance.PlanFragment)

Aggregations

PlanFragment (org.camunda.bpm.model.cmmn.instance.PlanFragment)1 PlanItemDefinition (org.camunda.bpm.model.cmmn.instance.PlanItemDefinition)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)1