Search in sources :

Example 1 with DecisionRule

use of org.camunda.bpm.model.dmn.instance.DecisionRule in project camunda-dmn-model by camunda.

the class DecisionRuleImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(DecisionRule.class, DMN_ELEMENT_DECISION_RULE).namespaceUri(DMN11_NS).extendsType(DmnElement.class).instanceProvider(new ModelTypeInstanceProvider<DecisionRule>() {

        public DecisionRule newInstance(ModelTypeInstanceContext instanceContext) {
            return new DecisionRuleImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    inputEntryCollection = sequenceBuilder.elementCollection(InputEntry.class).build();
    outputEntryCollection = sequenceBuilder.elementCollection(OutputEntry.class).required().build();
    typeBuilder.build();
}
Also used : OutputEntry(org.camunda.bpm.model.dmn.instance.OutputEntry) DmnElement(org.camunda.bpm.model.dmn.instance.DmnElement) 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) DecisionRule(org.camunda.bpm.model.dmn.instance.DecisionRule)

Aggregations

DecisionRule (org.camunda.bpm.model.dmn.instance.DecisionRule)1 DmnElement (org.camunda.bpm.model.dmn.instance.DmnElement)1 OutputEntry (org.camunda.bpm.model.dmn.instance.OutputEntry)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