[ http://jira.jboss.com/jira/browse/JBPM-103?page=history ]
     
Tom Baeyens resolved JBPM-103:
------------------------------

     Resolution: Done
    Fix Version: jBPM 3.0 alpha 3

The following mapping also worked for me.  And maps the 2 collections to the 
same table.  I don't like to have more tables then necessary.  Let me know if 
this doesn't work for you.

thanks ! 

regards, tom.

it is checked in into cvs.

<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">
      <key column="SCRIPTIN_" foreign-key="FK_INVARIABLES_SCRIPT" 
not-null="false"/>
      <element type="string" column="VARNAME" />
    </set>
    <set name="outVariables" table="JBPM_SCRIPTVARIABLES">
      <key column="SCRIPTOUT_" foreign-key="FK_OUTVARIABLES_SCRIPT" 
not-null="false"/>
      <element type="string" column="VARNAME" />
    </set>
  </subclass>
</hibernate-mapping>



> in variables on Script uses same DB table as out variables, causes evaluation 
> errors.
> -------------------------------------------------------------------------------------
>
>          Key: JBPM-103
>          URL: http://jira.jboss.com/jira/browse/JBPM-103
>      Project: JBoss jBPM
>         Type: Bug
>   Components: Core Engine
>     Versions: jBPM 3.0 alpha 2
>  Environment: J2SE 1.4.2_07, Windows XP
>     Reporter: Mark LaFond
>     Assignee: Tom Baeyens
>     Priority: Blocker
>      Fix For: jBPM 3.0 alpha 3
>  Attachments: Script.hbm.xml
>
>
> 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>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to