Skip to content

Commit

Permalink
[incubator-kie-drools#5752] [docs] Add explanation for DRL declared R…
Browse files Browse the repository at this point in the history
…ule Unit (#5755)
  • Loading branch information
tkobayas authored Mar 5, 2024
1 parent c1b7c69 commit c9941a4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9941a4

Please sign in to comment.