Can one app update the log of another app?

Hi Guys,

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?

Cheers,

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")
1 Like

Re-reading, maybe you're using Rule Machine, not custom Apps - in which case my answer has no value

1 Like

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.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.