[rules-users] Clarification needed in writing DSL function mapping
Wolfgang Laun
wolfgang.laun at gmail.com
Tue May 31 03:06:26 EDT 2011
You can simplify the "ignore case" for the keyword:
[keyword][](?i:func checkIfVia)=...
You should write the entire function as the right hand side. Take care to
escape '{' and '}':
...=function boolean checkIfVia(Route route, String locationCode) \{ if
(route != null) \{ Via[] viaArr = route.getViaArray(); for(int i=1; i <
viaArr.length; i++) if (
viaArr[i].getLocationCode().equalsIgnoreCase(locationCode) ) return true;
\} return false; \}
5.2.0 permit line breaks on the right hand side of DSL definitions.
-W
On 31 May 2011 07:43, Bala <bala.ganesh at accenture.com> wrote:
> Thanks Wolfgang..
> Should it be the same way, i have splited the function into blocks in DSL
> Mapping??
> I am more concerned about writing the function mapping in DSL since writing
> these functions in java requires compilation and redeployment in server.
>
> -Bala
>
>
>
>
> -----
> Thanks,
> Bala
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Clarification-needed-in-writing-DSL-function-mapping-tp3002064p3004691.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110531/a39ee2db/attachment.html
More information about the rules-users
mailing list