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()
       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">
       <transition to="first transition" name=""/>
       <java class="org.companyname.class.AClass" method="execute" name="first transition">
       <transition name="" to="fork"/>
       <fork name="fork">
       <transition name="" to="start a process" />
       <transition name="" to="start second process" />
       <java class="org.companyname.class.BClass" method="execute" name="start a process">
       <transition name="" to="join"/
       <java class="org.companyname.class.BClass" method="execute" name="start second process">
       <transition name="" to="join"/
       <join name="join">
       <transition name="" to="process joined"/>
       <java class="org.companyname.class.CClass" method="execute" name="process joined">
       <transition name="" to="end"/
       <end name="end"/>

      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.