Search in sources :

Example 1 with LinkEventDefinition

use of org.camunda.bpm.model.bpmn.instance.LinkEventDefinition in project camunda-bpmn-model by camunda.

the class LinkEventDefinitionImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(LinkEventDefinition.class, BPMN_ELEMENT_LINK_EVENT_DEFINITION).namespaceUri(BPMN20_NS).extendsType(EventDefinition.class).instanceProvider(new ModelTypeInstanceProvider<LinkEventDefinition>() {

        public LinkEventDefinition newInstance(ModelTypeInstanceContext instanceContext) {
            return new LinkEventDefinitionImpl(instanceContext);
        }
    });
    nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).required().build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    sourceCollection = sequenceBuilder.elementCollection(Source.class).qNameElementReferenceCollection(LinkEventDefinition.class).build();
    targetChild = sequenceBuilder.element(Target.class).qNameElementReference(LinkEventDefinition.class).build();
    typeBuilder.build();
}
Also used : LinkEventDefinition(org.camunda.bpm.model.bpmn.instance.LinkEventDefinition) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) LinkEventDefinition(org.camunda.bpm.model.bpmn.instance.LinkEventDefinition) EventDefinition(org.camunda.bpm.model.bpmn.instance.EventDefinition) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

EventDefinition (org.camunda.bpm.model.bpmn.instance.EventDefinition)1 LinkEventDefinition (org.camunda.bpm.model.bpmn.instance.LinkEventDefinition)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