Search in sources :

Example 6 with ModelTypeInstanceContext

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

the class ContextEntryImpl method registerType.

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

        public ContextEntry newInstance(ModelTypeInstanceContext instanceContext) {
            return new ContextEntryImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    variableChild = sequenceBuilder.element(Variable.class).build();
    expressionChild = sequenceBuilder.element(Expression.class).required().build();
    typeBuilder.build();
}
Also used : Expression(org.camunda.bpm.model.dmn.instance.Expression) 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) ContextEntry(org.camunda.bpm.model.dmn.instance.ContextEntry)

Example 7 with ModelTypeInstanceContext

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

the class DecisionImpl method registerType.

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

        public Decision newInstance(ModelTypeInstanceContext instanceContext) {
            return new DecisionImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    questionChild = sequenceBuilder.element(Question.class).build();
    allowedAnswersChild = sequenceBuilder.element(AllowedAnswers.class).build();
    variableChild = sequenceBuilder.element(Variable.class).build();
    informationRequirementCollection = sequenceBuilder.elementCollection(InformationRequirement.class).build();
    knowledgeRequirementCollection = sequenceBuilder.elementCollection(KnowledgeRequirement.class).build();
    authorityRequirementCollection = sequenceBuilder.elementCollection(AuthorityRequirement.class).build();
    supportedObjectiveChildElementCollection = sequenceBuilder.elementCollection(SupportedObjectiveReference.class).build();
    impactedPerformanceIndicatorRefCollection = sequenceBuilder.elementCollection(ImpactedPerformanceIndicatorReference.class).uriElementReferenceCollection(PerformanceIndicator.class).build();
    decisionMakerRefCollection = sequenceBuilder.elementCollection(DecisionMakerReference.class).uriElementReferenceCollection(OrganizationUnit.class).build();
    decisionOwnerRefCollection = sequenceBuilder.elementCollection(DecisionOwnerReference.class).uriElementReferenceCollection(OrganizationUnit.class).build();
    usingProcessCollection = sequenceBuilder.elementCollection(UsingProcessReference.class).build();
    usingTaskCollection = sequenceBuilder.elementCollection(UsingTaskReference.class).build();
    expressionChild = sequenceBuilder.element(Expression.class).build();
    // camunda extensions
    camundaHistoryTimeToLiveAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_HISTORY_TIME_TO_LIVE).namespace(CAMUNDA_NS).build();
    camundaVersionTag = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_VERSION_TAG).namespace(CAMUNDA_NS).build();
    typeBuilder.build();
}
Also used : DrgElement(org.camunda.bpm.model.dmn.instance.DrgElement) ImpactedPerformanceIndicatorReference(org.camunda.bpm.model.dmn.instance.ImpactedPerformanceIndicatorReference) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) DecisionOwnerReference(org.camunda.bpm.model.dmn.instance.DecisionOwnerReference) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) DecisionMakerReference(org.camunda.bpm.model.dmn.instance.DecisionMakerReference) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) Decision(org.camunda.bpm.model.dmn.instance.Decision)

Example 8 with ModelTypeInstanceContext

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

the class DecisionMadeReferenceImpl method registerType.

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

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

Example 9 with ModelTypeInstanceContext

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

the class DecisionOwnedReferenceImpl method registerType.

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

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

Example 10 with ModelTypeInstanceContext

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

the class DecisionOwnerReferenceImpl method registerType.

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

        public DecisionOwnerReference newInstance(ModelTypeInstanceContext instanceContext) {
            return new DecisionOwnerReferenceImpl(instanceContext);
        }
    });
    typeBuilder.build();
}
Also used : DecisionOwnerReference(org.camunda.bpm.model.dmn.instance.DecisionOwnerReference) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) DmnElementReference(org.camunda.bpm.model.dmn.instance.DmnElementReference) 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