2 Replies Latest reply on Dec 13, 2005 6:02 PM by Michael Holtzman

    jbpm tries to execute non-existent action

    Michael Holtzman Newbie

      Greetings. I have deployed the following 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="DealBooking">
      
       <start-state name="Start">
       <transition name="toGatherSummaryData" to="GatherSummaryData"></transition>
       </start-state>
      
       <end-state name="End"></end-state>
       <node name="GatherSummaryData">
       <action class="com.olf.workflowmgr.action.AvsScriptActionHandler">
       <scriptName>bpm_demo_get_summary_data</scriptName>
       </action>
      
       <transition name="GetApproval" to="WaitForManagerApproval"></transition>
      
       <event type="node-enter">
       <action name="TranNumToArgt" class="com.olf.workflowmgr.action.VariableToArgtActionHandler">
       <datatype>int</datatype>
       <variableName>TranNum</variableName>
       </action>
       </event>
       <event type="node-leave">
       <action name="SaveSummaryData" class="com.olf.workflowmgr.action.ReturntToVariableActionHandler">
       <variableName>SummaryData</variableName>
       </action>
       </event>
       </node>
       <task-node name="WaitForManagerApproval">
       <task name="ManagerApproval" blocking="true">
       <assignment class="com.olf.workflowmgr.action.TaskAssignmentHandler" expression="user(trader1)"></assignment>
       </task>
       <transition name="CheckCredit" to="QuickCreditCheck"></transition>
       <transition name="NotApproved" to="End"></transition>
       </task-node>
       <node name="QuickCreditCheck">
       <action class="com.olf.workflowmgr.action.AvsScriptActionHandler">
       <scriptName>bpm_demo_quick_credit_check</scriptName>
       </action>
       <transition name="toCheckLimit" to="InExcession">
       <action name="SetExcession" class="com.olf.workflowmgr.action.ReturntVarToVariableActionHandler">
       <variableName>Excession</variableName>
       <xPathExpression>//Excession[pos() = 1]//text()</xPathExpression>
       </action>
       </transition>
       </node>
       <decision name="InExcession">
       <transition name="toValidate" to="ValidateDeal">
       <condition>
       "True".equalsIgnoreCase( (String)Excession )
       </condition>
       </transition>
       <transition name="GetCreditApproval" to="CreditApproval"></transition>
       </decision>
       <node name="ValidateDeal">
       <action class="com.olf.workflowmgr.action.AvsScriptActionHandler">
       <scriptName>bpm_demo_validate_deal</scriptName>
       </action>
       <transition name="toEnd" to="End"></transition>
       </node>
       <task-node name="CreditApproval">
       <task name="CreditManagerApproval" blocking="true">
       <assignment class="com.olf.workflowmgr.action.TaskAssignmentHandler" expression="user(trader1)"></assignment>
       </task>
       <transition name="Validate" to="ValidateDeal"></transition>
       <transition name="CreditNotApproved" to="End"></transition>
       </task-node>
      
      </process-definition>
      


      When it signals to move into "WaitForApproval" I get this error:
      15:05:34,438 INFO ProcessCommand : Process instance id is 2704
      15:05:34,609 ERROR FieldInstantiator : couldn't parse set field 'xPathExpression' to value '<xPathExpression xmlns="http
       ://jbpm.org/3/jpdl">//job</xPathExpression>'
      java.lang.NoSuchFieldException: xPathExpression
       at java.lang.Class.getDeclaredField(Class.java:1854)
       at org.jbpm.instantiation.FieldInstantiator.setPropertyValue(FieldInstantiator.java:31)
       at org.jbpm.instantiation.FieldInstantiator.instantiate(FieldInstantiator.java:24)
       at org.jbpm.instantiation.Delegation.instantiate(Delegation.java:128)
       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)
       at org.jbpm.graph.def.Node.leave(Node.java:337)
       at org.jbpm.graph.exe.Token.signal(Token.java:127)
       at org.jbpm.graph.exe.Token.signal(Token.java:92)
       at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:201)
       at com.olf.workflowmgr.ProcessCommand.process(ProcessCommand.java:432)
       at com.olf.workflowmgr.ProcessCommand.run(ProcessCommand.java:49)
      15:05:35,172 INFO ProcessCommand : Process 2704 transition to WaitForManagerApproval
      


      That field data (xPathExpression=//job) does not appear in my process definition. I think it was in a previous version, but not in the most recently deployed definition. Any ideas why an action from an old process definition is being instantiated?

      Thanx.

        • 1. Re: jbpm tries to execute non-existent action
          Ronald van Kuijk Master

          it depends how you deployed the process and the actionhandlers. Are both versioned in the same .par file? If so are you sure the right class got in the .par file. If it was not refreshed, it could be the wrong version.

          It could also be that you hit a previous version of the process which rightfully contains a previous version of the actionhandlers. What I mean is that once you deploy a new version of a process, old instances keep running with the version of the process in which they were started.

          • 2. Re: jbpm tries to execute non-existent action
            Michael Holtzman Newbie

             


            it depends how you deployed the process and the actionhandlers. Are both versioned in the same .par file? If so are you sure the right class got in the .par file. If it was not refreshed, it could be the wrong version.


            I am reading the processdefinition.xml file from the par directory using the following code:
             ProcessDefinition definition = ProcessDefinition.parseXmlResource(processName);
            
             ProcessArchiveDeployer.deployProcessDefinition(definition, jbpmSessionFactory);
            
            


            The correct classes are specified in the action handler properties. Do action handler classes need to be explicitly versioned? I assumed that the process definition versioning took care of that.

            Thanx.