12 Replies Latest reply on Mar 25, 2010 1:08 PM by Valery LEPRETRE

    New version of process with modification in java class : the change is not taken into account

    Valery LEPRETRE Newbie

      Hi,

       

      I'm using jBPM 4.3 on JBoss 5.1.0 and Oracle 10g

       

      I've performed the jBPM installation with the following ant tasks :

      ant -Ddatabase=oracle -Djboss.version=5.1.0.GA -Djbpm.home=%JBPM_HOME% -Djboss.home=%JBOSS_HOME% create.jbpm.schema
      ant -Ddatabase=oracle -Djboss.version=5.1.0.GA -Djbpm.home=%JBPM_HOME% -Djboss.home=%JBOSS_HOME% install.jbpm.into.jboss

       

      I've deployed the jBPM examples using ant task :
      ant -Ddatabase=oracle -Djboss.version=5.1.0.GA -Djbpm.home=%JBPM_HOME% -Djboss.home=%JBOSS_HOME% install.examples.into.jboss

       

      I've written an small web application (deployed on the same Jboss server as jBPM) and using the jBPM service (processEngine obtained with the getProcessEngine API) able to start the "Async" process and it works fine.

       

      I modify the Async process just by adding some output in Application.java

       

      public void generatePdf() {
         System.out.println("generatePdf");
      }

      public void calculatePrimes() {
         System.out.println("calculatePrimes");
      }

       

      and then I deploy.

       

      When I start the new version of "Async", i see the correct outputs in the logs.

       

      Now my problem :

       

      I've written a small process "Test2"

       

      <?xml version="1.0" encoding="UTF-8"?>
      <process name="test2" xmlns="http://jbpm.org/4.3/jpdl">

       

          <start name="start"
                 g="32,49,88,30">
               <transition name="toJava1" to="java1" g="-29,-26"/>
          </start>

       

          <java name="java1" class="com.cadwin.jbpm.process.test2.Java1" method="display">
              <transition name="toEnd" to="end"/>
          </java>
         
          <end name="end"  g="185,507,48,48"/>
      </process>

       


      package com.cadwin.jbpm.process.test2;
      public class Java1 {
          public void display() {
              System.out.println("Java1");
          }
      }

       

      I deploy it with the same ant task as for "Async"
      I start it from my web application, and It works fine (correct output in the log)

       

      I modify the java1.java(just adding one more output)

       

      package com.cadwin.jbpm.process.test2;
      public class Java1 {
          public void display() {
              System.out.println("Java1");
              System.out.println("Java1");
          }
      }

       

      I deploy and when I start the new version of "Test2" process I see only one output in the log. (Exactly as if the process continue to use the previous version of java1.java)
      If I add another output in java1.java and deploy again, I continue to see only one output in the log.

       

      Could you help me to fix that problem?

       

      PS :

       

      If I modify the "Test2" process as follow


      <java name="java1" class="com.cadwin.jbpm.process.test2.Java1_1" method="display">
             <transition name="toEnd" to="end"/>
      </java>

       

      and if i copy je java1.java to java1_1.java and I deploy, the new version of process displays the two outputs.