Search in sources :

Example 1 with Association

use of org.camunda.bpm.model.dmn.instance.Association 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)

Aggregations

AssociationDirection (org.camunda.bpm.model.dmn.AssociationDirection)1 Artifact (org.camunda.bpm.model.dmn.instance.Artifact)1 Association (org.camunda.bpm.model.dmn.instance.Association)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