I have a central main rule which calls other child rules and I wanted to come up with a way to log events happening in the child rules in the main rules log. In that way I could monitor the full flow of events in one log. I solved this by using global variables which I set in the chiled rules which then could be picked up by the main rule and entered into the main rules log.
Is there another way to do this other than using global variables?
I haven't tried, but as you have stated there is a parent/child relationship between the apps, I'd imagine that you could create a generic function in the parent app, e.g.
def logFromChild(String msg) {
log.info(msg)
}
And in the child app, call
parent.logFromChild("I want to log this in parent app")
Hi @dkilgore90 ,
Thank you, and your answer helps. I am in this case using rule machine for the reason that I have not yet learnt grooy, but that is an ambition. So it helps.