Donald Walters [http://community.jboss.org/people/dondragon2] created the 
discussion

"Re: JBPM5 EL Expression"

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

--------------------------------------------------------------
Hi Maciej,

Based on your advice above I was able to make an implementation. This only 
works for condition expressions at the moment. But, I have been having an issue 
with the registration and usage of the dialect.

below is how I register it. This is done just before creating the KnoledgeBase 
ProcessDialectRegistry.setDialect("jexl", new ELProcessDialect()); 

The xml is as follows:
<sequenceFlow id="case15" sourceRef="decision8" targetRef="prompt9">
            <conditionExpression xsi:type="tFormalExpression" language="jexl"> 
${response['resultSet'] != null &amp;&amp; response['resultSet'][0][0] &gt; 
0}      </conditionExpression>
</sequenceFlow>

But this does not work.

If do the following it works perfectly.
ProcessDialectRegistry.setDialect("mvel", new ELProcessDialect()); 

The xml is as follows:
<sequenceFlow id="case15" sourceRef="decision8" targetRef="prompt9">
            <conditionExpression xsi:type="tFormalExpression"> 
${response['resultSet'] != null &amp;&amp; response['resultSet'][0][0] &gt; 
0}      </conditionExpression>
</sequenceFlow>

I realize that from the core xml parser there are some checks for languages and 
anything other than java, xpath, rule then there is an exception.
With some assistance I would be able to make the correct implementation and 
also for node support.

Attached is source.
note: I used the Apache Commons JEXL 2.0.1 library
--------------------------------------------------------------

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

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

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to