This is an automated email from the ASF dual-hosted git repository.

tzimanyi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-drools.git


The following commit(s) were added to refs/heads/main by this push:
     new b4031098af [incubator-kie-issues-803] Add an explanation of semicolon 
as OOPath delimiter in docs (#5829)
b4031098af is described below

commit b4031098afc58aa1105864a990ff734bdfbeca89
Author: Toshiya Kobayashi <[email protected]>
AuthorDate: Mon Apr 8 20:12:12 2024 +0900

    [incubator-kie-issues-803] Add an explanation of semicolon as OOPath 
delimiter in docs (#5829)
---
 .../ROOT/pages/language-reference/_drl-rules.adoc     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git 
a/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc 
b/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc
index 7c06016c2d..e1dd56afc1 100644
--- a/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc
+++ b/drools-docs/src/modules/ROOT/pages/language-reference/_drl-rules.adoc
@@ -1347,6 +1347,25 @@ You cannot embed a comma operator in a composite 
constraint expression, such as
 /persons[ ( age > 50 && weight > 80 ) || height > 2 ]
 ----
 
+[NOTE]
+====
+When you write multiple OOPath lines
+[source]
+----
+when
+  /persons[ age == "10" ]
+  /addresses[ city == "London" ]
+----
+Before {PRODUCT} 10, they were concatenated to one line `/persons[ age == "10" 
]/addresses[ city == "London" ]`. To avoid that, you need to explicitly use a 
semicolon `;` to separate the OOPath lines.
+[source]
+----
+when
+  /persons[ age == "10" ];
+  /addresses[ city == "London" ];
+----
+Since {PRODUCT} 10, {PRODUCT} considers the new line as a separator between 
OOPath lines. So the semicolon is not required.
+====
+
 === Bound variables in patterns and constraints
 
 You can bind variables to OOPath expressions of patterns and constraints to 
refer to matched objects in other portions of a rule. Bound variables can help 
you define rules more efficiently or more consistently with how you annotate 
facts in your data model.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to