Search in sources :

Example 1 with ProcessValidatorFactory

use of org.activiti.validation.ProcessValidatorFactory in project Activiti by Activiti.

the class InCompleteSignalConverterTest method validateModel.

private void validateModel(BpmnModel model) {
    FlowElement flowElement = model.getMainProcess().getFlowElement("task");
    assertThat(flowElement).isNotNull();
    assertThat(flowElement).isInstanceOf(UserTask.class);
    assertThat(flowElement.getId()).isEqualTo("task");
    ProcessValidator processValidator = new ProcessValidatorFactory().createDefaultProcessValidator();
    List<ValidationError> errors = processValidator.validate(model);
    assertThat(errors).isNotNull();
    assertThat(errors).hasSize(2);
}
Also used : FlowElement(org.activiti.bpmn.model.FlowElement) ProcessValidatorFactory(org.activiti.validation.ProcessValidatorFactory) ValidationError(org.activiti.validation.ValidationError) ProcessValidator(org.activiti.validation.ProcessValidator)

Example 2 with ProcessValidatorFactory

use of org.activiti.validation.ProcessValidatorFactory in project Activiti by Activiti.

the class DefaultProcessValidatorTest method setupProcessValidator.

@Before
public void setupProcessValidator() {
    ProcessValidatorFactory processValidatorFactory = new ProcessValidatorFactory();
    this.processValidator = processValidatorFactory.createDefaultProcessValidator();
}
Also used : ProcessValidatorFactory(org.activiti.validation.ProcessValidatorFactory) Before(org.junit.Before)

Aggregations

ProcessValidatorFactory (org.activiti.validation.ProcessValidatorFactory)2 FlowElement (org.activiti.bpmn.model.FlowElement)1 ProcessValidator (org.activiti.validation.ProcessValidator)1 ValidationError (org.activiti.validation.ValidationError)1 Before (org.junit.Before)1