Stephen Sitton [http://community.jboss.org/people/stevesitton] created the 
discussion

"JBPM Exception when running workflow"

To view the discussion, visit: http://community.jboss.org/message/550350#550350

--------------------------------------------------------------
Hi Guys,

 
I'm pretty new to jBPM and am seeing a couple of issues that hopefully someone 
can help with.
 
 
I have a workflow that basically parses a set of XML files and moves these to 
different directories depending on the stage of the processing and the overall 
outcome.  If there is only one file to process this workflow is fine but once I 
add another file I start seeing exceptions from JBPM.
 
JBPM: 4.0 (but have also tried 4.2 with the same errors)
Spring 3
JBoss 5.0.1GA
 
 
My workflow is setup as:
 
<?xml version="1.0" encoding="UTF-8"?>
 
<process id="settlementProcessor" name="settlementProcessor" xmlns=" 
http://jbpm.org/4.0/jpdl http://jbpm.org/4.0/jpdl";>
 
    <start name="start1" g="236,45,48,48">
        <transition name="to localGetSettlementFileChecker" 
to="localGetSettlementFileChecker" g="-135,-22"/>
    </start>
 
 
    <decision name="localGetSettlementFileChecker">
        <handler>
             <field name="fromVariable"><string 
value="farDirectoryFiles"/></field>
        </handler>
        <transition name="yes" to="moveFileDownloadAct" />
        <transition name="no" to="t_end" />
    </decision>
 
 
    <custom name="moveFileDownloadAct" g="185,140,133,52"   
class="com.workFlowProcessor.actions.MoveFileActivity">
      <field name="fromVariable"><string value="farDirectoryFiles"/></field>
      <field name="toVariable"><string value="farDirectoryProcessing"/></field>
        <transition name="to processSettlementAct" to="processSettlementAct" 
g="-54,-22"/>
    </custom>
 
 
    <custom name="processSettlementAct" g="192,217,147,52" 
class="com.workFlowProcessor.actions.SettlementProcessorActivity">
       <field name="directory"><string value="farDirectoryProcessing"/></field>
       <transition name="to processFarActivities" to="processFarActivities" 
g="-133,-11"/>
    </custom>
 
 
    <group name="processFarActivities">
        <start>
            <transition to="convertDataToMsgAct" />
        </start>
 
 
        <custom name="convertDataToMsgAct"   
class="com.workFlowProcessor.actions.SettlementDataConverterActivity">
            <transition to="groupDoneAct" />
        </custom>
 
 
        <end name="groupDoneAct" />
        <transition to="t_join" />
    </group>
 
 
    <custom name="t_join">
        <transition to="farProcessChecker" />
    </custom>
 
 
    <decision name="farProcessChecker">
        <handler class="com.workFlowProcessor.actions.SettlementFileChecker"  />
        <transition name="good" to="moveSuccessfulFileAct" />
        <transition name="bad" to="moveFailedFileAct" />
    </decision>
 
 
    <custom name="moveSuccessfulFileAct" g="185,140,133,52"    
class="com.workFlowProcessor.actions.MoveFileActivity">
        <field name="fromVariable"><string 
value="farDirectoryProcessing"/></field>
        <field name="toVariable"><string value="farDirectorySuccess"/></field>
        <field name="addTimestamp"><true /></field>
        <transition name="to localGetSettlementFileChecker" 
to="localGetSettlementFileChecker" g="-54,-22"/>
    </custom>
 
 
    <custom name="moveFailedFileAct" g="185,140,133,52"    
class="com.afp.workFlowProcessor.actions.MoveFileActivity">
        <field name="fromVariable"><string 
value="farDirectoryProcessing"/></field>
        <field name="toVariable"><string value="farDirectoryFailure"/></field>
        <field name="addTimestamp"><true /></field>
        <transition name="to localGetSettlementFileChecker" 
to="localGetSettlementFileChecker" g="-54,-22"/>
    </custom>
 
 
    <end name="t_end" g="234,468,48,48"/>
</process>
 
This is the exception I'm getting:
 
 
 
10:18:25,155 INFO  [DefaultCommandService] exception while executing command 
org.jbpm.pvm.internal.cmd.startprocessinstanceinlatest...@1e31239
java.lang.NullPointerException
at 
org.jbpm.pvm.internal.model.op.ExecuteEventListener.perform(ExecuteEventListener.java:68)
at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:655)
at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:615)
at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:215)
at 
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:65)
at 
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:38)
at 
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at 
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
at 
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at 
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at 
org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:70)
at 
com.playphone.alexander.afp.workFlowProcessor.WorkFlowProcess.run(WorkFlowProcess.java:62)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
10:18:25,157 ERROR [STDERR] java.lang.NullPointerException
10:18:25,157 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.op.ExecuteEventListener.perform(ExecuteEventListener.java:68)
10:18:25,157 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:655)
10:18:25,157 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:615)
10:18:25,157 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:215)
10:18:25,157 ERROR [STDERR]      at 
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:65)
10:18:25,157 ERROR [STDERR]      at 
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:38)
10:18:25,157 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
10:18:25,158 ERROR [STDERR]      at 
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
10:18:25,158 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
10:18:25,158 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
10:18:25,158 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
10:18:25,158 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:70)
10:18:25,158 ERROR [STDERR]      at 
com.playphone.alexander.afp.workFlowProcessor.WorkFlowProcess.run(WorkFlowProcess.java:62)
10:18:25,158 ERROR [STDERR]      at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
10:18:25,158 ERROR [STDERR]      at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
10:18:25,158 ERROR [STDERR]      at 
java.util.concurrent.FutureTask.run(FutureTask.java:138)
10:18:25,158 ERROR [STDERR]      at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
10:18:25,158 ERROR [STDERR]      at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
10:18:25,158 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:619)

 
 
 
I am also seeing this exception on certain runs too:
 
 
 10:36:21,846 INFO  [DefaultCommandService] exception while executing command   
org.jbpm.pvm.internal.cmd.startprocessinstanceinlatest...@11c8223
 org.jbpm.api.JbpmException: processInstanceId is null
at 
org.jbpm.pvm.internal.hibernate.DbSessionImpl.deleteProcessInstance(DbSessionImpl.java:231)
at org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:381)
at org.jbpm.jpdl.internal.activity.EndActivity.execute(EndActivity.java:82)
at org.jbpm.jpdl.internal.activity.EndActivity.execute(EndActivity.java:45)
at 
org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:655)
at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:615)
at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:215)
at 
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:65)
at 
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:38)
at 
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at 
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
at 
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at 
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at 
org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:70)
at 
com.playphone.alexander.afp.workFlowProcessor.WorkFlowProcess.run(WorkFlowProcess.java:62)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
 10:36:21,848 ERROR [STDERR] org.jbpm.api.JbpmException: processInstanceId is 
null
 10:36:21,849 ERROR [STDERR]      at 
org.jbpm.pvm.internal.hibernate.DbSessionImpl.deleteProcessInstance(DbSessionImpl.java:231)
 10:36:21,849 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.ExecutionImpl.end(ExecutionImpl.java:381)
 10:36:21,849 ERROR [STDERR]      at 
org.jbpm.jpdl.internal.activity.EndActivity.execute(EndActivity.java:82)
 10:36:21,849 ERROR [STDERR]      at 
org.jbpm.jpdl.internal.activity.EndActivity.execute(EndActivity.java:45)
 10:36:21,849 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.op.ExecuteActivity.perform(ExecuteActivity.java:60)
 10:36:21,849 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:655)
 10:36:21,849 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:615)
 10:36:21,849 ERROR [STDERR]      at 
org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:215)
 10:36:21,850 ERROR [STDERR]      at 
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:65)
10:36:21,850 ERROR [STDERR]      at 
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:38)
10:36:21,850 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
10:36:21,850 ERROR [STDERR]      at 
org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:54)
10:36:21,850 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
10:36:21,850 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
10:36:21,850 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
10:36:21,850 ERROR [STDERR]      at 
org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:70)
10:36:21,850 ERROR [STDERR]      at 
com.playphone.alexander.afp.workFlowProcessor.WorkFlowProcess.run(WorkFlowProcess.java:62)
10:36:21,851 ERROR [STDERR]      at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
10:36:21,851 ERROR [STDERR]      at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
10:36:21,851 ERROR [STDERR]      at 
java.util.concurrent.FutureTask.run(FutureTask.java:138)
10:36:21,851 ERROR [STDERR]      at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
10:36:21,851 ERROR [STDERR]      at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
10:36:21,851 ERROR [STDERR]      at java.lang.Thread.run(Thread.java:619)

 
Does anyone know what the problem could be?  I could try this out on 4.3/4.4 
but would like to understand what the problem is before I do.
 
 
Any help is much appreciated.
 
Steve

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/550350#550350]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to