IT Process Automation

 View Only

 Detached Child Processes monitored by the Parent Process

Joao Ricardo Oliveira's profile image
Joao Ricardo Oliveira posted Mar 31, 2023 04:49 PM

Sirs,

I need to create a process in PAM that should start N detached child processes. The N will be defined by the amount of items in an array.
I'm currently using event operators. The event monitor on the parent. And sending the event on the children.
But I can't get the event monitor operator to wait for N events.
I looped the event monitor operator in the same loop as the process start operator.
But, in use, I've seen some cases where the child processes terminated and the parent process is still waiting.
How to make the event monitor operator wait for N events? Or, is there any other solution to this problem? Knowing that the child processes terminated on the parent, without being attached.

Thanks a lot for the help


Attachment  View in library
PAM.png 81 KB
Felix Wollenweber's profile image
Felix Wollenweber

Hello Joao,

we had the same challenge in our environment and we also used event sending. But the problem ist, that in our environment it did not work reliable. So we opened a ticket at broadcom. 1/3 of the events got lost. The other 2/3 worked properly. Maybe it is just because of our architecture, but I think that there ist a general problem. 

Anyway. I can tell you how we set it up:
Parentprocess:

This is looped:
In pre-execution generating a random number (EventId) as an event-identifier for the subprocess and store it in an array. Because of "N"
In initializing detached subprocess: Giving it that EventId[N]

This is also looped:
Event-Monitoring operator getting configured with a source and a destination. E.G. "Parent"+Process.EventId[N]; and "Child"+Process.EventId[N];

Detached Child-Process:
Event-Sending-Operator is getting configured the same. (Not looped because it's one of those detached subs) Here you can configure how long an event is alive. You need to put that number higher, than the delay of the loop in the parent is expected. E.G. The parent is listening for 10 events and there is a duration of 20seconds configured --> it needs 200 seconds to listen for every event. So in worst case it needs 200 seconds till your event got listened (when parent is at N+1) and your event is N.

I try to attach our example of eventsending. Maybe it's a bit complicated at the first sight.

Attachment  View in library
Event.xml 842 KB