use of org.camunda.bpm.model.cmmn.instance.Relationship in project camunda-cmmn-model by camunda.
the class RelationshipImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Relationship.class, CMMN_ELEMENT_RELATIONSHIP).namespaceUri(CMMN11_NS).extendsType(CmmnElement.class).instanceProvider(new ModelTypeInstanceProvider<Relationship>() {
public Relationship newInstance(ModelTypeInstanceContext instanceContext) {
return new RelationshipImpl(instanceContext);
}
});
typeAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_TYPE).required().build();
directionAttribute = typeBuilder.enumAttribute(CMMN_ATTRIBUTE_DIRECTION, RelationshipDirection.class).build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
sourceCollection = sequenceBuilder.elementCollection(Source.class).minOccurs(1).build();
targetCollection = sequenceBuilder.elementCollection(Target.class).minOccurs(1).build();
typeBuilder.build();
}
Aggregations