Search in sources :

Example 1 with Assignment

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

the class AssignmentImpl method registerType.

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

        public Assignment newInstance(ModelTypeInstanceContext instanceContext) {
            return new AssignmentImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    fromChild = sequenceBuilder.element(From.class).required().build();
    toChild = sequenceBuilder.element(To.class).required().build();
    typeBuilder.build();
}
Also used : Assignment(org.camunda.bpm.model.bpmn.instance.Assignment) BaseElement(org.camunda.bpm.model.bpmn.instance.BaseElement) 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

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