The concepts of "local" and "accessible to another rule" are a little
bit
conflicting :)
This said, as others have already pointed out, there are many ways to
achieve this result, including:
- globals
- chaining : rule A inserts a fact and "pushes" it (also) into rule B, which
reacts to its insertion
- facts : both rule A and B see a fact in the WM and match/modify it
- queries : rule A inserts a fact and rule later B pulls it from the WM
If you could provide some more details about what you're trying to do, we
may be able to recommend the best approach. One thing for sure: the RHS of
different rules live in different scopes, so there is no way
to make a LOCAL variable (i.e. declared locally in a RHS) visible to other
rules' RHSs.
Best
Davide
--
View this message in context:
http://drools.46999.n3.nabble.com/Local-Variable-tp4020144p4020156.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.