4 Replies Latest reply on Nov 15, 2006 9:42 PM by yang zhang

    I have some problems Help!

    yang zhang Newbie

      hi
      i'm using jbpm to test a process,but when i add a even "node-leave",jbpm always tell some exceptions like this

      org.jbpm.jpdl.JpdlException: [[ERROR] line 20: 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., [WARNING] warning: no swimlane or assignment specified for task '




      ']
      at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:163)
      at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
      at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:153)
      at com.sample.SimpleProcessTest.testSimpleProcess(SimpleProcessTest.java:15)
      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 junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

      when i remove the event it run successful

      here is my processdefinition

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

      <process-definition
      name="simple" xmlns="http://jbpm.org/3/jpdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd ">
      <start-state name="start">







      </start-state>
      <end-state name="end"></end-state>
      <task-node name="TN_WriteRequest">






      </task-node>
      <task-node name="TN_TotalPart">



      </task-node>
      <task-node name="TN_Manager">



      </task-node>







      </process-definition>

      please help me ,thanks

        • 1. Re: I have some problems Help!
          yang zhang Newbie

           

          "achui_1980" wrote:
          hi
          i'm using jbpm to test a process,but when i add a even "node-leave",jbpm always tell some exceptions like this

          org.jbpm.jpdl.JpdlException: [[ERROR] line 20: 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., [WARNING] warning: no swimlane or assignment specified for task '<task xmlns="http://jbpm.org/3/jpdl" blocking="false" signalling="true" priority="normal">
          <controller>
          <variable name="dayType" access="read,write"/>
          <variable name="dayCount" access="read,write"/>
          </controller>
          </task>']
          at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:163)
          at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
          at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:153)
          at com.sample.SimpleProcessTest.testSimpleProcess(SimpleProcessTest.java:15)
          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 junit.framework.TestCase.runTest(TestCase.java:154)
          at junit.framework.TestCase.runBare(TestCase.java:127)
          at junit.framework.TestResult$1.protect(TestResult.java:106)
          at junit.framework.TestResult.runProtected(TestResult.java:124)
          at junit.framework.TestResult.run(TestResult.java:109)
          at junit.framework.TestCase.run(TestCase.java:118)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
          at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

          when i remove the event it run successful

          here is my processdefinition

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

          <process-definition
          name="simple" xmlns="http://jbpm.org/3/jpdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd ">
          <start-state name="start">
          <task>
          <controller>
          <variable name="dayType"></variable>
          <variable name="dayCount"></variable>
          </controller>
          </task>
          <transition name="tr1" to="TN_WriteRequest"></transition>
          </start-state>
          <end-state name="end"></end-state>
          <task-node name="TN_WriteRequest">
          <event type="node-leave">
          <action name="ac_nodeLeave" class="com.sample.action.nodeLeaveAction"></action>
          </event>


          <transition name="tr2" to="dc_dayType">
          </transition>
          </task-node>
          <task-node name="TN_TotalPart">
          <transition name="tr1" to="TN_Manager">
          <action name="ac_manager" class="com.sample.action.ManagerAction"></action>
          </transition>
          </task-node>
          <task-node name="TN_Manager">
          <transition name="tr1" to="end">
          <action name="ac_end" class="com.sample.action.EndAction"></action>
          </transition>
          </task-node>
          <decision name="dc_dayType">
          <handler class="com.sample.decision.decisionHandler"/>
          <transition name="tr_totalPart" to="TN_TotalPart">
          <action name="ac_dec_totalPart" class="com.sample.action.DTotalPart"></action>
          </transition>
          <transition name="tr_manager" to="TN_Manager"></transition>
          </decision>
          </process-definition>

          please help me ,thanks


          is anyboday can help me!

          • 2. Re: I have some problems Help!
            Tom Baeyens Master

            please use the [ code ] tags [ / code ] (but without the spaces)

            • 3. Re: I have some problems Help!
              yang zhang Newbie

              hi
              i'm using jbpm to test a process,but when i add a even "node-leave",jbpm always tell some exceptions like this

              org.jbpm.jpdl.JpdlException: [[ERROR] line 20: 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., [WARNING] warning: no swimlane or assignment specified for task '<task xmlns="http://jbpm.org/3/jpdl" blocking="false" signalling="true" priority="normal">
               <controller>
               <variable name="dayType" access="read,write"/>
               <variable name="dayCount" access="read,write"/>
               </controller>
               </task>']
               at org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:163)
               at org.jbpm.graph.def.ProcessDefinition.parseXmlInputStream(ProcessDefinition.java:172)
               at org.jbpm.graph.def.ProcessDefinition.parseXmlResource(ProcessDefinition.java:153)
               at com.sample.SimpleProcessTest.testSimpleProcess(SimpleProcessTest.java:15)
               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 junit.framework.TestCase.runTest(TestCase.java:154)
               at junit.framework.TestCase.runBare(TestCase.java:127)
               at junit.framework.TestResult$1.protect(TestResult.java:106)
               at junit.framework.TestResult.runProtected(TestResult.java:124)
               at junit.framework.TestResult.run(TestResult.java:109)
               at junit.framework.TestCase.run(TestCase.java:118)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
               at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
              

              when i remove the event it run successful

              here is my processdefinition
              <?xml version="1.0" encoding="UTF-8"?>
              
              <process-definition
               name="simple" xmlns="http://jbpm.org/3/jpdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jbpm.org/3/jpdl http://jbpm.org/xsd/jpdl-3.0.xsd ">
               <start-state name="start">
               <task>
               <controller>
               <variable name="dayType"></variable>
               <variable name="dayCount"></variable>
               </controller>
               </task>
               <transition name="tr1" to="TN_WriteRequest"></transition>
               </start-state>
               <end-state name="end"></end-state>
               <task-node name="TN_WriteRequest">
              <event type="node-leave">
               <action name="ac_nodeLeave" class="com.sample.action.nodeLeaveAction"></action>
               </event>
              
               <transition name="tr2" to="dc_dayType">
               </transition>
               </task-node>
               <task-node name="TN_TotalPart">
               <transition name="tr1" to="TN_Manager">
               <action name="ac_manager" class="com.sample.action.ManagerAction"></action>
               </transition>
               </task-node>
               <task-node name="TN_Manager">
               <transition name="tr1" to="end">
               <action name="ac_end" class="com.sample.action.EndAction"></action>
               </transition>
               </task-node>
               <decision name="dc_dayType">
               <handler class="com.sample.decision.decisionHandler"/>
               <transition name="tr_totalPart" to="TN_TotalPart">
               <action name="ac_dec_totalPart" class="com.sample.action.DTotalPart"></action>
               </transition>
               <transition name="tr_manager" to="TN_Manager"></transition>
               </decision>
              </process-definition>
              

              please help me ,thanks


              • 4. Re: I have some problems Help!
                yang zhang Newbie

                i have found why this error occurs the transition tag must before event tag .