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 c9941a4415 [incubator-kie-drools#5752] [docs] Add explanation for DRL
declared Rule Unit (#5755)
c9941a4415 is described below
commit c9941a44159f512d14e2c9b3d1ea0cc8089cc5b8
Author: Toshiya Kobayashi <[email protected]>
AuthorDate: Tue Mar 5 17:08:06 2024 +0900
[incubator-kie-drools#5752] [docs] Add explanation for DRL declared Rule
Unit (#5755)
---
.../src/modules/ROOT/pages/language-reference/_drl-rules.adoc | 5 +++++
1 file changed, 5 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 07aefbce97..17904986f6 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
@@ -144,6 +144,11 @@ rule "Using a rule unit with a declared type"
end
----
+[NOTE]
+====
+If you declare a rule unit in DRL, the rule unit class will be generated by
{PRODUCT} at build time. It means that you can't refer to the class in your
client codes. Declared rule units are only useful when the client is also
auto-generated, for example, REST endpoint generation by Drools-Quarkus
integration.
+====
+
To separate the fact types from the rule unit for use with other DRL rules,
you can declare the types in a separate DRL file and then use the DRL rule file
to declare the data sources by using the `RuleUnitData` interface
implementation:
.Example DRL type declaration as a separate file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]