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

in variables on Script uses same DB table as out variables, causes evaluation errors.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • jBPM 3.0.0
    • jBPM 3.0.0
    • Runtime Engine
    • None

    Description

      The following script was failing for me.

      " <script>" +
      " <expression>" +
      " outParm = response.getTestOutputParm();" +
      " </expression>" +
      " <out variable='outParm' />" +
      " </script>" +

      The problem was traced back to Script.hbm.xml which was mapping the in variables to the same table as the out variables. This caused Script.createInterpreter() to load all of the out variables as in variables which caused my "response" variable to NOT be loaded into the Interpreter which then caused the script to fail. I've attached the fix below, I've tested it in the core project as well as in the db project that generates the SQL.

      **********
      <?xml version="1.0"?>
      <!DOCTYPE hibernate-mapping PUBLIC
      "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
      "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

      <hibernate-mapping default-access="field" >
      <subclass name="org.jbpm.jpdl.def.Script"
      discriminator-value="S"
      extends="org.jbpm.graph.def.Action">
      <property name="expression" column="EXPRESSION_" />
      <property name="resultVariableName" column="RESULTVARIABLENAME_" />
      <set name="inVariables" table="JBPM_SCRIPTVARIABLES_IN">
      <key column="SCRIPT_" foreign-key="FK_VARIABLE_SCRIPT_IN" />
      <element type="string" />
      </set>
      <set name="outVariables" table="JBPM_SCRIPTVARIABLES_OUT">
      <key column="SCRIPT_" foreign-key="FK_VARIABLE_SCRIPT_OUT"/>
      <element type="string" />
      </set>
      </subclass>
      </hibernate-mapping>

      Attachments

        Activity

          People

            tom.baeyens Tom Baeyens (Inactive)
            lafondoo Mark LaFond (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: