Hello,
I Need to SUM weeks qty's for a part No. I have it working now with this Business Rule on the BO.
BO Rule:
IF BO1 IS NEW
THEN BO1.week01Demand=SUM BO2.Week01 WHERE(BO2.StartWeek=SystemSettings.ThisWeek AND BO2.PartNo=BO1.PartNo)
This is repeats 45 times for weeks 1-25 and Months 1-17 for the current week Then repeats again for Lastweeks Weeks 1-25 and Months 1-17
My question is after I create the record for BO1 would it perform better if I did all the SUMS in the process?
Does it take longer to perform these steps when they are in a Business Rule?
Regards,
Roger
Question on Business Rules vs Process Rules and Performance
Question on Business Rules vs Process Rules and Performance
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Re: Question on Business Rules vs Process Rules and Performa
For many situations like this that are fairly easily modeled, I would simply test your the different approaches you are considering & determine which one is most effective for your scenario.
Tom - V8.8 build 3137 - MySql / PostGres
Re: Question on Business Rules vs Process Rules and Performa
Roger,
Don´t know how your solution works etc. but one thing to think about when working with BO rules is that rules are evaluated again and again when BO instances are changed etc. so sometimes it´s better to plan for that and use a single rule that starts a process and then does a lot of stuff i.e. minimize the total number of rules evaluated.
In your case it´s probably not needed but just wanted to share this thought because in more advanced scenarios it might be.
Don´t know how your solution works etc. but one thing to think about when working with BO rules is that rules are evaluated again and again when BO instances are changed etc. so sometimes it´s better to plan for that and use a single rule that starts a process and then does a lot of stuff i.e. minimize the total number of rules evaluated.
In your case it´s probably not needed but just wanted to share this thought because in more advanced scenarios it might be.
Henrik (V8 Developer Ed. - Windows)