Search in sources :

Example 1 with ParticipantAssociation

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

the class ParticipantAssociationImpl method registerType.

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

        public ParticipantAssociation newInstance(ModelTypeInstanceContext instanceContext) {
            return new ParticipantAssociationImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    innerParticipantRefChild = sequenceBuilder.element(InnerParticipantRef.class).required().qNameElementReference(Participant.class).build();
    outerParticipantRefChild = sequenceBuilder.element(OuterParticipantRef.class).required().qNameElementReference(Participant.class).build();
    typeBuilder.build();
}
Also used : 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) ParticipantAssociation(org.camunda.bpm.model.bpmn.instance.ParticipantAssociation) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

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