Search in sources :

Example 1 with CorrelationKey

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

the class CorrelationKeyImpl method registerType.

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

        public CorrelationKey newInstance(ModelTypeInstanceContext instanceContext) {
            return new CorrelationKeyImpl(instanceContext);
        }
    });
    nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    correlationPropertyRefCollection = sequenceBuilder.elementCollection(CorrelationPropertyRef.class).qNameElementReferenceCollection(CorrelationProperty.class).build();
    typeBuilder.build();
}
Also used : BaseElement(org.camunda.bpm.model.bpmn.instance.BaseElement) CorrelationKey(org.camunda.bpm.model.bpmn.instance.CorrelationKey) 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)

Aggregations

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