Search in sources :

Example 1 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-dmn-model by camunda.

the class AssociationImpl method registerType.

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

        public Association newInstance(ModelTypeInstanceContext instanceContext) {
            return new AssociationImpl(instanceContext);
        }
    });
    associationDirectionAttribute = typeBuilder.enumAttribute(DMN_ATTRIBUTE_ASSOCIATION_DIRECTION, AssociationDirection.class).defaultValue(AssociationDirection.None).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    sourceRef = sequenceBuilder.element(SourceRef.class).required().uriElementReference(DmnElement.class).build();
    targetRef = sequenceBuilder.element(TargetRef.class).required().uriElementReference(DmnElement.class).build();
    typeBuilder.build();
}
Also used : Association(org.camunda.bpm.model.dmn.instance.Association) AssociationDirection(org.camunda.bpm.model.dmn.AssociationDirection) 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) Artifact(org.camunda.bpm.model.dmn.instance.Artifact)

Example 2 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder in project camunda-dmn-model by camunda.

the class AuthorityRequirementImpl method registerType.

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

        public AuthorityRequirement newInstance(ModelTypeInstanceContext instanceContext) {
            return new AuthorityRequirementImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    requiredDecisionRef = sequenceBuilder.element(RequiredDecisionReference.class).uriElementReference(Decision.class).build();
    requiredInputRef = sequenceBuilder.element(RequiredInputReference.class).uriElementReference(InputData.class).build();
    requiredAuthorityRef = sequenceBuilder.element(RequiredAuthorityReference.class).uriElementReference(KnowledgeSource.class).build();
    typeBuilder.build();
}
Also used : RequiredAuthorityReference(org.camunda.bpm.model.dmn.instance.RequiredAuthorityReference) AuthorityRequirement(org.camunda.bpm.model.dmn.instance.AuthorityRequirement) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) RequiredDecisionReference(org.camunda.bpm.model.dmn.instance.RequiredDecisionReference) RequiredInputReference(org.camunda.bpm.model.dmn.instance.RequiredInputReference) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Example 3 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder 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 4 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder 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 5 with SequenceBuilder

use of org.camunda.bpm.model.xml.type.child.SequenceBuilder 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

ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)152 SequenceBuilder (org.camunda.bpm.model.xml.type.child.SequenceBuilder)152 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)133 BaseElement (org.camunda.bpm.model.bpmn.instance.BaseElement)14 CmmnElement (org.camunda.bpm.model.cmmn.instance.CmmnElement)13 Expression (org.camunda.bpm.model.dmn.instance.Expression)8 FlowElement (org.camunda.bpm.model.bpmn.instance.FlowElement)4 Task (org.camunda.bpm.model.cmmn.instance.Task)4 EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)3 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)3 DmnElement (org.camunda.bpm.model.dmn.instance.DmnElement)3 DrgElement (org.camunda.bpm.model.dmn.instance.DrgElement)3 NamedElement (org.camunda.bpm.model.dmn.instance.NamedElement)3 ConversationNode (org.camunda.bpm.model.bpmn.instance.ConversationNode)2 CorrelationPropertyRetrievalExpression (org.camunda.bpm.model.bpmn.instance.CorrelationPropertyRetrievalExpression)2 Expression (org.camunda.bpm.model.bpmn.instance.Expression)2 FlowNode (org.camunda.bpm.model.bpmn.instance.FlowNode)2 Operation (org.camunda.bpm.model.bpmn.instance.Operation)2 Task (org.camunda.bpm.model.bpmn.instance.Task)2 Node (org.camunda.bpm.model.bpmn.instance.di.Node)2