[jboss-svn-commits] JBL Code SVN: r7450 - labs/jbossrules/branches/3.0.x/documentation/manual/en/Chapter-Rule_Language
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Nov 7 15:10:15 EST 2006
Author: tirelli
Date: 2006-11-07 15:10:11 -0500 (Tue, 07 Nov 2006)
New Revision: 7450
Modified:
labs/jbossrules/branches/3.0.x/documentation/manual/en/Chapter-Rule_Language/Section-DSL.xml
Log:
JBRULES-475: Updating documentation
Modified: labs/jbossrules/branches/3.0.x/documentation/manual/en/Chapter-Rule_Language/Section-DSL.xml
===================================================================
--- labs/jbossrules/branches/3.0.x/documentation/manual/en/Chapter-Rule_Language/Section-DSL.xml 2006-11-07 20:08:21 UTC (rev 7449)
+++ labs/jbossrules/branches/3.0.x/documentation/manual/en/Chapter-Rule_Language/Section-DSL.xml 2006-11-07 20:10:11 UTC (rev 7450)
@@ -196,12 +196,17 @@
it is easy to do a mapping using the above techniques. However, chances
are that you will have many fields, and many combinations. If this is the
case, you can setup your mappings like so: <programlisting>[when]There is a Cheese with=Cheese()
-[when]-age is less than {age}=age<{age}
-[when]-type is '{type}'=type=='{type}'
-[when]-country equal to '{country}'=country=='{country}'</programlisting> You
- can then write rules with conditions like the following: <programlisting>There is a Cheese with
- -age is less than 42
- -type is 'stilton'</programlisting> The parser will pick up the "-"
+[when]- age is less than {age}=age<{age}
+[when]- type is '{type}'=type=='{type}'
+[when]- country equal to '{country}'=country=='{country}'</programlisting></para>
+
+ <para><emphasis role="bold">IMPORTANT:</emphasis> There must be an space
+ between the "-" (dash) and the constraint mappings.</para>
+
+ <para> You can then write rules with conditions like the following:
+ <programlisting>There is a Cheese with
+ - age is less than 42
+ - type is 'stilton'</programlisting> The parser will pick up the "-"
lines (they have to be on their own line) and add them as constraints to
the declaration above. So in this specific case, using the above mappings,
is the equivalent to doing (in DRL): <programlisting>Cheese(age<42, type=='stilton')</programlisting>
More information about the jboss-svn-commits
mailing list