Search in sources :

Example 11 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext 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)

Example 12 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.

the class DecisionTableImpl method registerType.

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

        public DecisionTable newInstance(ModelTypeInstanceContext instanceContext) {
            return new DecisionTableImpl(instanceContext);
        }
    });
    hitPolicyAttribute = typeBuilder.namedEnumAttribute(DMN_ATTRIBUTE_HIT_POLICY, HitPolicy.class).defaultValue(HitPolicy.UNIQUE).build();
    aggregationAttribute = typeBuilder.enumAttribute(DMN_ATTRIBUTE_AGGREGATION, BuiltinAggregator.class).build();
    preferredOrientationAttribute = typeBuilder.namedEnumAttribute(DMN_ATTRIBUTE_PREFERRED_ORIENTATION, DecisionTableOrientation.class).defaultValue(DecisionTableOrientation.Rule_as_Row).build();
    outputLabelAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_OUTPUT_LABEL).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    inputCollection = sequenceBuilder.elementCollection(Input.class).build();
    outputCollection = sequenceBuilder.elementCollection(Output.class).required().build();
    ruleCollection = sequenceBuilder.elementCollection(Rule.class).build();
    typeBuilder.build();
}
Also used : DecisionTable(org.camunda.bpm.model.dmn.instance.DecisionTable) Expression(org.camunda.bpm.model.dmn.instance.Expression) HitPolicy(org.camunda.bpm.model.dmn.HitPolicy) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) Output(org.camunda.bpm.model.dmn.instance.Output) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) DecisionTableOrientation(org.camunda.bpm.model.dmn.DecisionTableOrientation)

Example 13 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.

the class DefaultOutputEntryImpl method registerType.

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

        public DefaultOutputEntry newInstance(ModelTypeInstanceContext instanceContext) {
            return new DefaultOutputEntryImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : LiteralExpression(org.camunda.bpm.model.dmn.instance.LiteralExpression) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) DefaultOutputEntry(org.camunda.bpm.model.dmn.instance.DefaultOutputEntry)

Example 14 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.

the class DefinitionsImpl method registerType.

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

        public Definitions newInstance(ModelTypeInstanceContext instanceContext) {
            return new DefinitionsImpl(instanceContext);
        }
    });
    expressionLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPRESSION_LANGUAGE).defaultValue("http://www.omg.org/spec/FEEL/20140401").build();
    typeLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_TYPE_LANGUAGE).defaultValue("http://www.omg.org/spec/FEEL/20140401").build();
    namespaceAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_NAMESPACE).required().build();
    exporterAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPORTER).build();
    exporterVersionAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPORTER_VERSION).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    importCollection = sequenceBuilder.elementCollection(Import.class).build();
    itemDefinitionCollection = sequenceBuilder.elementCollection(ItemDefinition.class).build();
    drgElementCollection = sequenceBuilder.elementCollection(DrgElement.class).build();
    artifactCollection = sequenceBuilder.elementCollection(Artifact.class).build();
    elementCollectionCollection = sequenceBuilder.elementCollection(ElementCollection.class).build();
    businessContextElementCollection = sequenceBuilder.elementCollection(BusinessContextElement.class).build();
    typeBuilder.build();
}
Also used : Definitions(org.camunda.bpm.model.dmn.instance.Definitions) 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) NamedElement(org.camunda.bpm.model.dmn.instance.NamedElement)

Example 15 with ModelTypeInstanceContext

use of org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext in project camunda-dmn-model by camunda.

the class DescriptionImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Description.class, DMN_ELEMENT_DESCRIPTION).namespaceUri(DMN11_NS).instanceProvider(new ModelTypeInstanceProvider<Description>() {

        public Description newInstance(ModelTypeInstanceContext instanceContext) {
            return new DescriptionImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : Description(org.camunda.bpm.model.dmn.instance.Description) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)373 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)373 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)133 BaseElement (org.camunda.bpm.model.bpmn.instance.BaseElement)27 DmnElementReference (org.camunda.bpm.model.dmn.instance.DmnElementReference)23 CmmnElement (org.camunda.bpm.model.cmmn.instance.CmmnElement)14 Expression (org.camunda.bpm.model.bpmn.instance.Expression)13 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)9 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)9 Task (org.camunda.bpm.model.bpmn.instance.Task)8 Expression (org.camunda.bpm.model.cmmn.instance.Expression)8 Expression (org.camunda.bpm.model.dmn.instance.Expression)8 FormalExpression (org.camunda.bpm.model.bpmn.instance.FormalExpression)5 InformationItem (org.camunda.bpm.model.dmn.instance.InformationItem)5 LiteralExpression (org.camunda.bpm.model.dmn.instance.LiteralExpression)5 NamedElement (org.camunda.bpm.model.dmn.instance.NamedElement)5 Gateway (org.camunda.bpm.model.bpmn.instance.Gateway)4 CaseParameter (org.camunda.bpm.model.cmmn.instance.CaseParameter)4 PlanItemDefinition (org.camunda.bpm.model.cmmn.instance.PlanItemDefinition)4 Task (org.camunda.bpm.model.cmmn.instance.Task)4