JBoss Community

Re: HQL activity - parameters with EL evaluated values

created by James Baker in jBPM - View the full discussion

It's seem's I've managed to answer my own question! (which always seems to be the way when I finally resort to asking a forum)

I needed to specify the query as follows: -

 


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

 

 

Where I failed in my initial attempts at this is that the shipped jpdl-4.4.xsd doesn't allow the attribute "name" on the element object thus my OCD refused to allow me to try entering a name. :)

This must mean that the XSD isn't used at runtime to parse the XML otherwise how does it work?

Unless there is a different copy of the XSD being used at runtime to the one shipped in the distro maybe?

Should I submit a feature request for a documentation update and/or a bug for the XSD?

AbstractDescriptor defines "name" as a field so anything extending that should be able to use a name safely.

Reply to this message by going to Community

Start a new discussion in jBPM at Community