Search in sources :

Example 1 with Interface

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

the class InterfaceImpl method registerType.

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

        public Interface newInstance(ModelTypeInstanceContext instanceContext) {
            return new InterfaceImpl(instanceContext);
        }
    });
    nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME).required().build();
    implementationRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_IMPLEMENTATION_REF).build();
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    operationCollection = sequenceBuilder.elementCollection(Operation.class).required().build();
    typeBuilder.build();
}
Also used : RootElement(org.camunda.bpm.model.bpmn.instance.RootElement) SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) Operation(org.camunda.bpm.model.bpmn.instance.Operation) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext) Interface(org.camunda.bpm.model.bpmn.instance.Interface)

Aggregations

Interface (org.camunda.bpm.model.bpmn.instance.Interface)1 Operation (org.camunda.bpm.model.bpmn.instance.Operation)1 RootElement (org.camunda.bpm.model.bpmn.instance.RootElement)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