Search in sources :

Example 1 with CamundaValidation

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

the class CamundaValidationImpl method registerType.

public static void registerType(ModelBuilder modelBuilder) {
    ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaValidation.class, CAMUNDA_ELEMENT_VALIDATION).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaValidation>() {

        public CamundaValidation newInstance(ModelTypeInstanceContext instanceContext) {
            return new CamundaValidationImpl(instanceContext);
        }
    });
    SequenceBuilder sequenceBuilder = typeBuilder.sequence();
    camundaConstraintCollection = sequenceBuilder.elementCollection(CamundaConstraint.class).build();
    typeBuilder.build();
}
Also used : SequenceBuilder(org.camunda.bpm.model.xml.type.child.SequenceBuilder) ModelElementTypeBuilder(org.camunda.bpm.model.xml.type.ModelElementTypeBuilder) CamundaValidation(org.camunda.bpm.model.bpmn.instance.camunda.CamundaValidation) ModelTypeInstanceContext(org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)

Aggregations

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