I have 2 records A and B with one to many relationships, both the records contains a column isActive(boolean). I have a process model that is triggered as related action of record A and this process model contains Start Process(node) with MNI, and a child process will be triggered for each child of record A, this child process is used to deactivate the corresponding child record by marking isActive as false. Here the requirement is, only when all the child process instances finsh by marking the corresponding child rows as deactivated, we need to deactivate the Parent row in the Parent process model,
How can we achieve this?
I tried using send mesaage and recieve message events and it's working but I am not sure this is a preferred way as we are sending message from each and every child instance, if we have 1000 child records 1000 messages will be sent, I don't know weather sending these many messages cause any issue. Is it fine to use the approach or do we have to do something other than this
Discussion posts and replies are publicly visible
Please help me. You do all of this process-calls-sub-process+messaging thing just to update a few rows in the DB? Is this an automatic process? This does not feel like a very efficient implementation.
Why not just do a query database node or call a stored procedure to update all children. Then query whether all have been deactivated and then update the parent accordingly.
Totally agree with Stefan Helzle ... seems better , easier and more efficient...