Package org.activiti.validation

Examples of org.activiti.validation.ProcessValidator


    FlowElement flowElement = model.getMainProcess().getFlowElement("task");
    assertNotNull(flowElement);
    assertTrue(flowElement instanceof UserTask);
    assertEquals("task", flowElement.getId());

    ProcessValidator processValidator = new ProcessValidatorFactory().createDefaultProcessValidator();
    List<ValidationError> errors = processValidator.validate(model);
    assertNotNull(errors);
    assertEquals(2, errors.size());
  }
View Full Code Here


        bpmnModel = converter.convertToBpmnModel(streamSource, validateSchema, enableSafeBpmnXml);
      }
     
      // XSD validation goes first, then process/semantic validation
      if (validateProcess) {
        ProcessValidator processValidator = processEngineConfiguration.getProcessValidator();
        if (processValidator == null) {
          LOGGER.warn("Process should be validated, but no process validator is configured on the process engine configuration!");
        } else {
          List<ValidationError> validationErrors = processValidator.validate(bpmnModel);
          if(validationErrors != null && !validationErrors.isEmpty()) {
           
            StringBuilder warningBuilder = new StringBuilder();
            StringBuilder errorBuilder = new StringBuilder();
           
View Full Code Here

    this.bpmnModel = bpmnModel;
  }

  @Override
  public List<ValidationError> execute(CommandContext commandContext) {
    ProcessValidator processValidator = commandContext.getProcessEngineConfiguration().getProcessValidator();
    if (processValidator == null) {
      throw new ActivitiException("No process validator defined");
    }
   
    return processValidator.validate(bpmnModel);
  }
View Full Code Here

TOP

Related Classes of org.activiti.validation.ProcessValidator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.