4 Replies Latest reply: Feb 8, 2011 10:30 AM by Kris Verlaenen RSS

jBPM 5.0 released

Kris Verlaenen Master
  • 1. jBPM 5.0 released
    HUI LIU Newbie

    Bravo, Kris!

    But I have a question about the execution of BPMN processes.

    In jbpm5, the rule flows (ResourceType.DRF) are transformed to drools rules (Drools Rule Language) for execution, BPMN processes (ResourceType.BPMN2) are also transformed to drools rules just before their execution?

    Waiting for your response.

    Thanks.

  • 2. jBPM 5.0 released
    Mauricio Salatino Master

    Hi Hui,

    The processes are not transformed to rules for the execution. Neither of them are transformed (DRF or BPMN files).

    Greetings.

  • 3. Re: jBPM 5.0 released
    HUI LIU Newbie

    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 );
    ......
    }
    
    
  • 4. Re: jBPM 5.0 released
    Kris Verlaenen Master

    The jBPM5 engine does not translate processes into rules (and neither did Drools Flow).  It uses a simple state machine to represent the current state and signal next states, etc.  The section you are referring to however allows you to combine this with rules if you want.  For example, if you want to use complex rule constraints (using the Drools DRL) in your exclusive gateway, we will generate the rules for you.  Similarly, if you use a condition start event, we will generate a rule that will trigger your process if that condition is met.


    The normal control flow however does not use rules or a rules engine, it works by having different state nodes trigger each other.

     

    Kris