I want to implement business rules functionality to validate some of the rules for the objects. All the articles I find online refers to the implementation of OOTB validations and some of the article clearly states what are BusinessRule, BusinessRuleSet and BusinessRuleLink but no article explains where I need to add my validation logic. Please provide your suggestions if you have implemented custom business rules for a specific custom validation.
Example: I want to get the upstream view of the resulting object and throw conflict if upstream was not available.
I can't answer your question but have implemented another solution for the a similar usecase.
The requirement was the users should always create Downstream view first and after create downstream view (New Branch) in MAPSB (WC12 BOM Transformer).
We did solve it with OIR that will set view to Design:
<!-- set the view -->
<AttrValue id="view.id" algorithm="wt.rule.algorithm.StringConstant">
<AttrConstraint id="view.id" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
Now users can only create new parts with Design view, and that have to use MAPSB to create new downstream branch.
Perhaps this can help you.
Thank you for the response. The example that I have given was just a fraction of a single rule, I have other validations also that needed to be performed on the resulting objects.
May want to check out the "object validator" from Felco for this type of thing.