If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#50573 by Jhstephenson
Fri Mar 15, 2019 6:05 pm
I hope I can explain this well enough for someone to get an idea about what is happening….

I have 3 Business Objects: CaseMaster, Case Documents, and MediaFiles. CaseDocuments and MediaFiles are children of CaseMaster.

On my CaseMaster Main Form I have tabs that will let me go to the list of Documents or Media Files for each Case.

I can add a case and everything gets added the way it should and goes back to the case list query like I want it to.

The problem I have is that if I update a Case record, without ever looking at the Documents or Media Files, when I click ‘Save’, after the Rules for the CaseMaster are executed, it starts going through the Rules for both CaseDocuments and MediaFiles even though nothing has been done to either of those BO’s. The odd part here to is that it is going through not just the records associated with the one case I was working on, but all Media and Document records. Which basically results in an endless loop that ultimately causes the system to time out.

I guess the main question is why is an update in the parent causing rules to be executed in the children?

The secondary, but maybe more important question is, why is it executing those rules for every record in the CaseDocuments and MediaFiles tables?

I don’t know if that is enough of an explanation but hopefully it will spark an idea in somebody.

#50576 by PointsWell
Sun Mar 17, 2019 12:03 am
Jhstephenson wrote:Does the "Don't check referred" indicator go on the Parent or Child rules?

If it goes on the parent I checked every rule on the CaseMaster with that and it still did the same thing

Checking it on the parent will prevent he rules running on the parent when the child is updated.
#50577 by tford
Sun Mar 17, 2019 1:13 am
While checking referred BO's with rules can cause inefficiency and a BSV to slow WAY down, I haven't experienced it creating an endless loop and time out situation.

My gut feeling is that you have some other issue with your rules. One way to narrow down offending rules is to temporarily put a 1=0 condition in rules to disable them and leave one rule without the condition. By testing one rule at a time, some light may shine on your problem.
#50578 by PointsWell
Sun Mar 17, 2019 3:33 am
tford wrote:My gut feeling is that you have some other issue with your rules.

Potentially something along lines of

If parent.attribute affected then update child.attribute with a subsequent if child.attribute changed then update parent.attribute. This will obviously not show up if you are testing each rule in isolation but will show up if you switch each rule on one at a time.

Also check that Parent is not doing something to Parent.peerChild attribute as obviously that is running on your parent but updating your child. Likewise any rules on Child.obParent.

Who is online

Users browsing this forum: Google [Bot] and 13 guests