Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-2834

Node.getDefaultLeavingTransition returns null when there is no unconditional transition

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • jBPM 3.2.11
    • jBPM 3.2.9
    • Runtime Engine
    • None

    Description

      The documentation reads:
      ====
      The contents of the condition element is a jPDL expression that should evaluate to a boolean. A decision takes the first transition (as ordered in the processdefinition.xml) for which the expression resolves to true. If none of the conditions resolve to true, the default leaving transition (== the first one) will be taken.
      ====

      If I have only a conditional transition in a node (hence the first one) it is not used as the default leaving transition.

      Process definition to simulate the behaviour:
      ====
      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="processDefinition3">
      <start-state name="start">
      <transition to="node1"></transition>
      </start-state>

      <node name="node1" async="true">
      <transition to="node2" condition="#

      {AAA == null}

      "></transition>
      </node>
      <node name="node2">
      <transition to="end1"></transition>
      </node>
      <end-state name="end1"></end-state>
      </process-definition>
      ====

      Exception being thrown on signaling process's token:
      10:16:33,629 ERROR [JobExecutorThread] job execution failure
      org.jbpm.JbpmException: transition is null
      at org.jbpm.graph.def.Node.leave(Node.java:449)
      at org.jbpm.graph.def.Node.leave(Node.java:430)
      at org.jbpm.graph.def.Node.execute(Node.java:421)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
      at org.jbpm.graph.def.Node_$$javassist_81.execute(Node$$_javassist_81.java)
      at org.jbpm.job.ExecuteNodeJob.execute(ExecuteNodeJob.java:24)
      at org.jbpm.job.executor.JobExecutorThread.executeJob(JobExecutorThread.java:192)
      at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:66)

      JBPM-Console says:
      Error signalling token: An exception of type "org.jbpm.JbpmException" was thrown. The message is: Node(node1) has no default transition

      Attachments

        Issue Links

          Activity

            People

              mvecera Martin Vecera
              mvecera Martin Vecera
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: