[esb-issues] [JBoss JIRA] Updated: (JBESB-1966) EsbActionHandler cannot put property value of an object in jBPM scope to ESB message

Mark Little (JIRA) jira-events at lists.jboss.org
Fri Aug 29 05:01:43 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBESB-1966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Little updated JBESB-1966:
-------------------------------

    Component/s: Process flow


> EsbActionHandler cannot put property value of an object in jBPM scope to ESB message
> ------------------------------------------------------------------------------------
>
>                 Key: JBESB-1966
>                 URL: https://jira.jboss.org/jira/browse/JBESB-1966
>             Project: JBoss ESB
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Process flow
>    Affects Versions: 4.3, 4.4
>            Reporter: Jacky Cheung
>
> I am developing application on JBossESB with jBPM as the workflow engine.
> In my process definition (jpdl), I have the following node:
>     <node name="retrieve  record">
>         <action name="fetch record" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
>             <esbCategoryName>Test</esbCategoryName>
>             <esbServiceName>TestService</esbServiceName>
>             <bpmToEsbVars>
>                 <mapping bpm="request.studentName" esb="studentName"/>
>             </bpmToEsbVars>
>             <esbToBpmVars>
>                 <mapping esb="status"/>
>             </esbToBpmVars>
>         </action>
>         <transition name="ok" to="decide notify parent"/>
>     </node>
> I got the following exception when jBPM transits into the node
> Caused by: org.mvel.PropertyAccessException: unable to resolve property: request
> 	at org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.getBeanProperty(ReflectiveAccessorOptimizer.java:374)
> After debuging, I discover JBpmObjectMapper has a bug that breaks the feature.
> Line 157 of the class (in JBossESB 4.3) is
>     objectName = expression.substring(0, dotPosition-1);
> In my example, the content of expression variable will be "request.studentName" and the objectName will be "reques". This is wrong. The expectation is "request".
> The fix to this bug is simple. Just remove "-1" from the line so that the line should read as...
>     objectName = expression.substring(0, dotPosition);
> I checked EsbNotifier and I found it call the same class. That means this bug will affect EsbNotifier as well.
> At the moment, I can change the bpm attribute to "processInstance.contextInstance.variables.request.studentName" to workaround the bug but my XML becomes difficult to read.
> I also breaks in JBossESB 4.4.
> The fix is very simple but critical (from my point of view).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the esb-issues mailing list