Search in sources :

Example 1 with Decision

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

the class DecisionImpl method registerType.

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

        public Decision newInstance(ModelTypeInstanceContext instanceContext) {
            return new DecisionImpl(instanceContext);
        }
    });
    nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME).build();
    implementationTypeAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_IMPLEMENTATION_TYPE).defaultValue("http://www.omg.org/spec/CMMN/DecisionType/Unspecified").build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    inputCollection = sequenceBuilder.elementCollection(InputDecisionParameter.class).build();
    outputCollection = sequenceBuilder.elementCollection(OutputDecisionParameter.class).build();
    typeBuilder.build();
}
Also used : 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) Decision(org.camunda.bpm.model.cmmn.instance.Decision)

Aggregations

Decision (org.camunda.bpm.model.cmmn.instance.Decision)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