2 Replies Latest reply on Jan 4, 2006 5:03 AM by koen.aers

    Invalid content was found starting with element 'transition'

    nildon

      Hi,

      I have defined a process definition with Nodes. I want to know how Nodes can be used. i got that actions can be added for Node under four different events namely
      1. Before Signal
      2. After Signal
      3. Node enter
      4. Node Leave

      so to test the sequence of this I created 4 Action Handlers with just a SOP that which handler it is. And assigned to action on each of these events.
      When I execute this using Test class I am getting following error:

      16:47:30,525 DEBUG JpdlXmlReader : process definition line 24: cvc-complex-type.2.4.a: Invalid content was found starting with element 'transition'. One of '{"http://jbpm.org/3/jpdl":event, "http://jbpm.org/3/jpdl":timer, "http://jbpm.org/3/jpdl":exception-handler}' is expected.

      Here is my process definition

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition
       xmlns="http://jbpm.org/3/jpdl"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd "
       name="simple">
       <start-state name="start">
       <transition name="to_node1" to="node1"></transition>
       </start-state>
       <node name="node1">
       <event type="node-enter">
       <action name="action1" class="com.sample.action.NodeEnterActionHandler"></action>
       </event>
       <event type="before-signal">
       <action name="action1" class="com.sample.action.BeforeSignalActionHandler"></action>
       </event>
       <event type="after-signal">
       <action name="action1" class="com.sample.action.AfterSignalActionHandler"></action>
       </event>
       <event type="node-leave">
       <action name="action1" class="com.sample.action.NodeExitActionHandler"></action>
       </event>
       <transition name="to_end1" to="end1">
       </transition>
       </node>
      
       <end-state name="end1"></end-state>
      
      </process-definition>


      what I understand from the error is some tag is missing or wrongly placed near 'transition' element. But what I created was from the graphical tool and didnot change the process definition XML. Then what causes the definition XML to be wrong and not to conform with the expected element structure?

      Thanks,
      Nilesh

        • 1. Re: Invalid content was found starting with element 'transit
          ralfoeldi

          Hi Nilesh,

          jBPM goofs with the created XML. Have a look at the referenced schema or open it in something like XMLSpy, that will tell you what's wrong. Its usually just an incorrect order of elements. Do not edit the xml outside of Eclipse. For some unknown reason - I haven't had time or interest to find out :-( - the editor looses it when the xml is edited externally.

          Greetings

          Rainer

          • 2. Re: Invalid content was found starting with element 'transit
            koen.aers

            The schema is being worked upon at this very time. Look for the upcoming release or have a peek in CVS. The issue with GPD losing it is a bit more complicated. I'll have to work on a decent import and node layout algorithm to solve that.

            Cheers,
            Koen