4 Replies Latest reply on Nov 27, 2005 3:22 AM by windspy

    where to store action?database or runtime classes?

      here is piece of process definition:

      <start-state name="new disclosure-assitant">
      <task name="Assistant new a disclosure" swimlane="assitant">
      ...
      </task>
      <event type="node-leave">
      <action name="initial" class="idap.process.initial.InitialGlobalVariables" />
      </event>
      <transition name="default" to="choose avaiable time-board" />
      </start-state>
      
      <task-node name="choose avaiable time-board">
      <task name="Bd choose time" duedate="36 hours">
      <assignment class="idap.process.delegation.BoardMembersAssign" />
      ...
      </task>
      
      <event type="node-leave">
      <action class="idap.process.derived.StoreParticipants" />
      </event>
      <transition .../>
      </task-node>
      


      deploy.xml like:
      <copy todir="build/invention/classes">
      <fileset dir="build/classes.idap" includes="idap/process/**" />
      </copy>
      


      and the actions in the start-state node and the assignment class works fine,either deploy in the database or put int runtime classes folder in web-inf of application,but the action of idap.process.derived.StoreParticipant can not works in both of methods.it throws:
      action threw exception: couldn't get value for file 'classes/idap/process/derived/StoreParticipants.class'
      java.lang.RuntimeException: couldn't get value for file 'classes/idap/process/derived/StoreParticipants.class'
       at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:160)
       at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:34)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:105)
       at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:90)
       at org.jbpm.graph.def.Action.execute(Action.java:78)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:186)
       at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:149)
       at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:133)
      Caused by: java.lang.RuntimeException: couldn't get value for file 'classes/idap/process/derived/StoreParticipants.class'
       at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:160)
       at org.jbpm.instantiation.ProcessClassLoader.findClass(ProcessClassLoader.java:34)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:105)
       at org.jbpm.instantiation.Delegation.getInstance(Delegation.java:90)
       at org.jbpm.graph.def.Action.execute(Action.java:78)
       at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:186)
       ... 56 more
      Caused by: java.lang.RuntimeException: file 'classes/idap/process/derived/StoreParticipants.class' not found in db
       at org.jbpm.file.def.FileDefinition.getByteArray(FileDefinition.java:184)
       at org.jbpm.file.def.FileDefinition.getBytesFromDb(FileDefinition.java:176)
       at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:157)
       ... 63 more
      


      but i searched in the database,tables of jbpm_bytearray and jbpm_byteblock,the action classes' file path and data are all complete.

      why?where should i store the action?Is there something wrong with that?
      anyone have the same experience?

      thank you in advance.

      windspy

        • 1. Re: where to store action?database or runtime classes?
          kukeltje

          This is to little information to give you an answer. The deploy.xml code you describe is just a copy command. Does that command actually work? And if so, how do you deploy it? You use a par file? does that file contain the classes?

          Please provide us with more info to try and help you solve your problem

          • 2. Re: where to store action?database or runtime classes?

            thank you for your instant answer,yes,i zip the process files and action classes into a par file named invention.par. The par file has all the classes in the classes folder which is in the same level with processdefinition.xml.My ant script is as follows:

            <target name="build.processes" depends="compile.idap" description="builds the idap processes">
             <mkdir dir="build/invention/classes" />
             <copy todir="build/invention">
             <fileset dir="src/process/invention.par" />
             </copy>
             <copy todir="build/invention/classes">
             <fileset dir="build/classes.idap" includes="idap/process/**" />
             </copy>
             <zip destfile="build/invention.par">
             <fileset dir="build/invention" />
             </zip>
             </target>





            • 3. Re: where to store action?database or runtime classes?
              kukeltje

              is the class realy called idap.process.derived.StoreParticipants ? I've had such an error once when I had a small typo between the real class name and the one in the processdefinition.

              • 4. Re: where to store action?database or runtime classes?

                thanks,it really just a typo problem.:)