JBoss Community

JBPM 3.1 Exception thrown on EndState

created by Al Daher in jBPM - View the full discussion

Hi,

 

i am running my first JBPM example and i am encountrin a thrown exception at the end of the process.

The flow from start State through the next Nodes is gone smoothly except when the token is at end State i get the following exception message

org.jbpm.JbpmException: can't leave node 'EndState(endProjectManagementProcess)' without leaving transition

What i understand is that it's expecting a transition  a transition on End State Node. But what i know is that end state has no further transactions.

Exception is thrown in Node class cz Transition is null

My Process definition

 

<?xml version="1.0" encoding="UTF-8"?>

 

<process-definition

  xmlns="urn:jbpm.org:jpdl-3.1"

  name="projectManagementProcess">

   <start-state name="startProjectManagementProcess">

     <task>

        <controller>

          <variable name="color" />

          <variable name="size" />

        </controller>

      </task>

        <transition to="validateProject" name="toValidateProject"></transition>

   </start-state>

   <node name="validateProject">

        <action class="com.dell.fo3test.workflow.action.ValidateProjectHandler"></action>

        <transition to="decideWhetherValidOrNot" name="toDecideUponValidationResult"></transition>

    </node>

 

    <node name="createProject">

        <action class="com.dell.fo3test.workflow.action.CreateProjectHandler"></action>

        <transition to="waitForProjectAssignmentTrigger"></transition>

    </node>

 

    <task-node name="waitForProjectAssignmentTrigger">

        <transition to="decideUponProjectStatusChange" name="toDecideUponProjectStatusChange"></transition>

    </task-node>

 

    <decision name="decideUponProjectStatusChange">

        <handler class="com.dell.fo3test.workflow.action.ProjectStatusChangeDecisionHandler"></handler>

        <transition to="endProjectManagementProcess" name="toEndProjectWithNoTeamAssignment"></transition>

        <transition to="waitForProjectStatusChangeTrigger" name="toWaitForTeamOrCustomerTrigger"></transition>

    </decision>

 

    <task-node name="waitForProjectStatusChangeTrigger">

        <transition to="decideUponTeamandCustomerActions"></transition>

    </task-node>

 

    <decision name="decideUponTeamandCustomerActions">

        <handler class="com.dell.fo3test.workflow.action.ProjectStatusChangeDecisionHandler"></handler>

        <transition to="endProjectManagementProcess" name="toEndProcessWithProjectAccomplished"></transition>

        <transition to="reopenProjectForMainteneance" name="toReopenProjectForMainteneance"></transition>

    </decision>

 

    <node name="reopenProjectForMainteneance">

        <transition to="waitForProjectStatusChangeTrigger"></transition>

    </node>

 

    <decision name="decideWhetherValidOrNot">

        <handler class="com.dell.fo3test.workflow.action.ProjectStatusChangeDecisionHandler"></handler>

        <transition to="deleteProject" name="toEndProjectManagementProcessIfNotValid"></transition>

        <transition to="createProject" name="toCreateProject"></transition>

    </decision>

 

    <node name="deleteProject">

        <action class="com.dell.fo3test.workflow.action.DeleteProjectHandler"></action>

        <transition to="endProjectManagementProcess" name="toEnd"></transition>

    </node>

   <end-state name="endProjectManagementProcess"></end-state>

</process-definition>

 

Exception:

org.jbpm.graph.def.DelegationException

    at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)

    at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)

    at org.jbpm.graph.def.Node.execute(Node.java:333)

    at org.jbpm.graph.def.Node.enter(Node.java:316)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)

    at org.jbpm.graph.def.Node_$$_javassist_84.enter(Node_$$_javassist_84.java)

    at org.jbpm.graph.def.Transition.take(Transition.java:119)

    at org.jbpm.graph.def.Node.leave(Node.java:383)

    at org.jbpm.graph.node.StartState.leave(StartState.java:70)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)

    at org.jbpm.graph.def.Node_$$_javassist_84.leave(Node_$$_javassist_84.java)

    at org.jbpm.graph.exe.Token.signal(Token.java:178)

    at org.jbpm.graph.exe.Token.signal(Token.java:123)

    at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)

    at com.dell.fo3test.bpm.AbstractFO3BPMTest.startProcessInstance(AbstractFO3BPMTest.java:142)

    at com.dell.fo3test.bpm.AbstractProcessManagementBPMTest.startProjectManagementProcess(AbstractProcessManagementBPMTest.java:80)

    at com.dell.fo3test.bpm.ProcessTest.testStartNotValidProjectProcess(ProcessTest.java:35)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:81)

    at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)

    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)

    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)

    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)

    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)

    at org.testng.TestRunner.runWorkers(TestRunner.java:1172)

    at org.testng.TestRunner.privateRun(TestRunner.java:757)

    at org.testng.TestRunner.run(TestRunner.java:608)

    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)

    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)

    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)

    at org.testng.SuiteRunner.run(SuiteRunner.java:240)

    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)

    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)

    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)

    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1154)

    at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)

    at org.testng.TestNG.run(TestNG.java:999)

    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)

    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:203)

    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:174)

Caused by: org.jbpm.JbpmException: can't leave node 'EndState(endProjectManagementProcess)' without leaving transition

    at org.jbpm.graph.def.Node.leave(Node.java:365)

    at org.jbpm.graph.def.Node.leave(Node.java:347)

    at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:120)

    at com.dell.fo3test.workflow.action.ValidateProjectHandler.execute(ValidateProjectHandler.java:57)

    at org.jbpm.graph.def.Action.execute(Action.java:123)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)

    at org.jbpm.graph.def.Action_$$_javassist_36.execute(Action_$$_javassist_36.java)

    at org.jbpm.graph.def.Node.execute(Node.java:328)

    ... 48 more

org.jbpm.graph.def.DelegationException

    at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)

    at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)

    at org.jbpm.graph.def.Node.execute(Node.java:333)

    at org.jbpm.graph.def.Node.enter(Node.java:316)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)

    at org.jbpm.graph.def.Node_$$_javassist_84.enter(Node_$$_javassist_84.java)

    at org.jbpm.graph.def.Transition.take(Transition.java:119)

    at org.jbpm.graph.def.Node.leave(Node.java:383)

    at org.jbpm.graph.node.StartState.leave(StartState.java:70)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)

    at org.jbpm.graph.def.Node_$$_javassist_84.leave(Node_$$_javassist_84.java)

    at org.jbpm.graph.exe.Token.signal(Token.java:178)

    at org.jbpm.graph.exe.Token.signal(Token.java:123)

    at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:217)

    at com.dell.fo3test.bpm.AbstractFO3BPMTest.startProcessInstance(AbstractFO3BPMTest.java:142)

    at com.dell.fo3test.bpm.AbstractProcessManagementBPMTest.startProjectManagementProcess(AbstractProcessManagementBPMTest.java:80)

    at com.dell.fo3test.bpm.ProcessTest.testStartNotValidProjectProcess(ProcessTest.java:35)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:81)

    at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)

    at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)

    at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)

    at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)

    at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)

    at org.testng.TestRunner.runWorkers(TestRunner.java:1172)

    at org.testng.TestRunner.privateRun(TestRunner.java:757)

    at org.testng.TestRunner.run(TestRunner.java:608)

    at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)

    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)

    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)

    at org.testng.SuiteRunner.run(SuiteRunner.java:240)

    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)

    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)

    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)

    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1154)

    at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)

    at org.testng.TestNG.run(TestNG.java:999)

    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)

    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:203)

    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:174)

Caused by: org.jbpm.JbpmException: can't leave node 'EndState(endProjectManagementProcess)' without leaving transition

    at org.jbpm.graph.def.Node.leave(Node.java:365)

    at org.jbpm.graph.def.Node.leave(Node.java:347)

    at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:120)

    at com.dell.fo3test.workflow.action.ValidateProjectHandler.execute(ValidateProjectHandler.java:57)

    at org.jbpm.graph.def.Action.execute(Action.java:123)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)

    at org.jbpm.graph.def.Action_$$_javassist_36.execute(Action_$$_javassist_36.java)

    at org.jbpm.graph.def.Node.execute(Node.java:328)

    ... 48 more

Reply to this message by going to Community

Start a new discussion in jBPM at Community