Search in sources :

Example 1 with AuthorityRequirement

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

Aggregations

AuthorityRequirement (org.camunda.bpm.model.dmn.instance.AuthorityRequirement)1 RequiredAuthorityReference (org.camunda.bpm.model.dmn.instance.RequiredAuthorityReference)1 RequiredDecisionReference (org.camunda.bpm.model.dmn.instance.RequiredDecisionReference)1 RequiredInputReference (org.camunda.bpm.model.dmn.instance.RequiredInputReference)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