Search in sources :

Example 86 with ModelTypeInstanceContext

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

Example 87 with ModelTypeInstanceContext

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

the class DecisionParameterImpl method registerType.

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

        public DecisionParameter newInstance(ModelTypeInstanceContext instanceContext) {
            return new DecisionParameterImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : DecisionParameter(org.camunda.bpm.model.cmmn.instance.DecisionParameter) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) Parameter(org.camunda.bpm.model.cmmn.instance.Parameter) DecisionParameter(org.camunda.bpm.model.cmmn.instance.DecisionParameter) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 88 with ModelTypeInstanceContext

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

the class DefaultControlImpl method registerType.

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

        public DefaultControl newInstance(ModelTypeInstanceContext instanceContext) {
            return new DefaultControlImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) PlanItemControl(org.camunda.bpm.model.cmmn.instance.PlanItemControl) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) DefaultControl(org.camunda.bpm.model.cmmn.instance.DefaultControl)

Example 89 with ModelTypeInstanceContext

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

the class WhileExecutingOutputRefs method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(WhileExecutingOutputRefs.class, BPMN_ELEMENT_WHILE_EXECUTING_OUTPUT_REFS).namespaceUri(BPMN20_NS).instanceProvider(new ModelTypeInstanceProvider<WhileExecutingOutputRefs>() {

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

Example 90 with ModelTypeInstanceContext

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

the class BpmnDiagramImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(BpmnDiagram.class, BPMNDI_ELEMENT_BPMN_DIAGRAM).namespaceUri(BPMNDI_NS).extendsType(Diagram.class).instanceProvider(new ModelTypeInstanceProvider<BpmnDiagram>() {

        public BpmnDiagram newInstance(ModelTypeInstanceContext instanceContext) {
            return new BpmnDiagramImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    bpmnPlaneChild = sequenceBuilder.element(BpmnPlane.class).required().build();
    bpmnLabelStyleCollection = sequenceBuilder.elementCollection(BpmnLabelStyle.class).build();
    typeBuilder.build();
}
Also used : BpmnPlane(org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnPlane) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) BpmnDiagram(org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnDiagram) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) BpmnDiagram(org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnDiagram) Diagram(org.camunda.bpm.model.bpmn.instance.di.Diagram)

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