[jboss-user] [jBPM] - Re: JBPM5 EL Expression
Donald Walters
do-not-reply at jboss.com
Sat Aug 27 22:29:30 EDT 2011
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/623342#623342
--------------------------------------------------------------
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 && response['resultSet'][0][0] > 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 && response['resultSet'][0][0] > 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/623342#623342]
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/20110827/d69854e1/attachment-0001.html
More information about the jboss-user
mailing list