JBoss Community

Re: jBPM 5.0 released

created by HUI LIU in jBPM - View the full discussion

Hi Mauricio

I read the source code of JBPM5.0 (krisv-jbpm-5.0-CR1-35-gc7bef4e.zip), in \jbpm-flow-builder\src\main\java\org\jbpm\compiler\ProcessBuilderImpl.java.

In this file, it transforms rule flows into rule languages.

However according to what you said, jbpm doesn't transform rule flows into rule languages, so I am confused.

 

The following is a piece of the code in ProcessBuilderImpl.java.

Can you tell me what is the function of the file "ProcessBuilderImpl.java".

 

public void buildProcess(final Process process, Resource resource) {
        if ( resource != null && ((InternalResource)resource).hasURL() ) {
            ((org.jbpm.process.core.Process) process).setResource( resource );
        }
        boolean hasErrors = false;
        ProcessValidator validator = processValidators.get(((Process)process).getType());
        if (validator == null) {
            System.out.println("Could not find validator for process " + ((Process)process).getType() + ".");
            System.out.println("Continuing without validation of the process " + process.getName() + "[" + process.getId() + "]");
        } else {
            ProcessValidationError[] errors = validator.validateProcess( (WorkflowProcess) process );
            if ( errors.length != 0 ) {
                hasErrors = true;
                for ( int i = 0; i < errors.length; i++ ) {
                    this.errors.add( new ParserError( errors[i].toString(),
                                                      -1,
                                                      -1 ) );
                }
            }
        }
        if ( !hasErrors ) {
            // generate and add rule for process
            String rules = generateRules( process );
......
}

Reply to this message by going to Community

Start a new discussion in jBPM at Community