1 Reply Latest reply on Aug 12, 2009 1:15 PM by Ronald van Kuijk

    struggling getting to grips with jbpm

    Mustafa Musaji Novice

      Hi, I'm hoping someone can point me in the right direction. I have a number of problems with Jbpm but they are probably all related to the fact that I need to learn a lot more about it.

      But I have come to a stop when it comes to implementing a workflow with a fork in it. I'm using JBPM 4.0. When I attempt to run my test class I get an SQL exception.

      This is the code I am using to test my workflow.

       deploymentId = repositoryService.createDeployment()
       .addResourceFromClasspath("process.jpdl.xml").deploy();
      
       ProcessInstance processInstance = executionService.startProcessInstanceByKey("process");
       String processInstanceId = processInstance.getId();
      


      My work flow looks something like this. I've simplified it but I'm pretty sure I'm doing something pretty basic wrong here.

      <process name="process" xmlns="http://jbpm.org/4.0/jpdl">
       <start>
       <transition to="first transition" name=""/>
       </start>
      
       <java class="org.companyname.class.AClass" method="execute" name="first transition">
       <transition name="" to="fork"/>
       </java>
      
       <fork name="fork">
       <transition name="" to="start a process" />
       <transition name="" to="start second process" />
       </fork>
      
       <java class="org.companyname.class.BClass" method="execute" name="start a process">
       <transition name="" to="join"/
       </java>
      
       <java class="org.companyname.class.BClass" method="execute" name="start second process">
       <transition name="" to="join"/
       </java>
      
       <join name="join">
       <transition name="" to="process joined"/>
       </join>
      
       <java class="org.companyname.class.CClass" method="execute" name="process joined">
       <transition name="" to="end"/
       </java>
      
       <end name="end"/>
       </process>
      


      The exception I'm getting is this
      16:55:02,332 WRN | [JDBCExceptionReporter] SQL Error: 1062, SQLState: 23000
      16:55:02,332 SEV | [JDBCExceptionReporter] Duplicate entry 'fraud.70.' for key 2


      If anyone can provide me with any sort of guidance then it would much appreciated. As you can probably tell I'm on a steep learning curve with Jboss and JBPM.

      Regards
      M