[jboss-user] [jBPM] - HQL activity - parameters with EL evaluated values

James Baker do-not-reply at jboss.com
Wed Sep 15 06:07:36 EDT 2010


James Baker [http://community.jboss.org/people/jimmyb82] created the discussion

"HQL activity - parameters with EL evaluated values"

To view the discussion, visit: http://community.jboss.org/message/561825#561825

--------------------------------------------------------------
Hi,

I've been searching around the documentation, tutorials and forums (for two days) to try to understand how I specify parameters to the HQL activity where the value is defined in the execution context.
I'm using jBPM 4.4 and JBoss EAP 5.0.
I've tried to specify my HQL node in various fashions bearing in mind there is a executionContext var called invoiceId and it is a Long: -


   <hql name="Check invoice" g="258,162,117,52" var="invoice" unique="true">
      <query>from Invoice i where i.invoiceId = :invoiceId</query>
          <parameters>
             <string name="invoiceId" value="#{invoiceId}" />
          </parameters>
      <transition name="Check paid" to="Paid?" g="-62,-4"/>
   </hql>



This tries to pass the text as a String with the value "#{invoiceId}"
If i try to do this with a <long /> then it won't even deploy my process.
It seemed like i should use a reference as follows: -



   <hql name="Check invoice" g="258,162,117,52" var="invoice" unique="true">      <query>from Invoice i where i.invoiceId = :invoiceId</query>          <parameters>

             <ref object="invoiceId" />

           </parameters>

      <transition name="Check paid" to="Paid?" g="-62,-4"/>

   </hql>






but this fails because org.jbpm.jpdl.internal.activity.HQLActivity uses the set named parameter methods and there is no way to pass anonymous parameters. It is an anonymous parameter because the ReferenceDescriptor class returns null for getName() and there is no way to specify a name for <ref /> under the  http://jbpm.org/4.4/jpdl http://jbpm.org/4.4/jpdl namespace.

According to this feature request  https://jira.jboss.org/browse/JBPM-2279 https://jira.jboss.org/browse/JBPM-2279 we should be able to use EL but there is no reference in the documentation as to how.

Can anyone help?

P.S sorry if this comes out badly formatted, it's my first post.

James
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/561825#561825]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100915/868ad533/attachment-0001.html 


More information about the jboss-user mailing list