Search in sources :

Example 1 with Extension

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

the class ExtensionImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Extension.class, BPMN_ELEMENT_EXTENSION).namespaceUri(BPMN20_NS).instanceProvider(new ModelTypeInstanceProvider<Extension>() {

        public Extension newInstance(ModelTypeInstanceContext instanceContext) {
            return new ExtensionImpl(instanceContext);
        }
    });
    // TODO: qname reference extension definition
    definitionAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_DEFINITION).build();
    mustUnderstandAttribute = typeBuilder.booleanAttribute(BPMN_ATTRIBUTE_MUST_UNDERSTAND).defaultValue(false).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    documentationCollection = sequenceBuilder.elementCollection(Documentation.class).build();
    typeBuilder.build();
}
Also used : Extension(org.camunda.bpm.model.bpmn.instance.Extension) 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

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