locked
Business Rules changing a Domain Based Attribute value RRS feed

  • Question

  • Hi All,

    I have a question about what should be really simple functionality in MDS not working as expected.

    On my "Customer" Entity, I have the following columns a:

    • CustomerType (free text) 
    • IsApproved (DBA - Yes{0} and No {0}) 

    The first business rule I have on this table defaults IsApproved to "No".

    The second business rule looks for "CustomerType has changed" and if so sets IsApproved to "No". This rule doesn't work. 

    If I change the action on business rule 2 to set "IsApproved to Invalid" it works so the problem is not the condition. I've tried quite a lot of permutations and still can't get the IsApproved value to change. 

    Anyone have any suggestions?

    Thanks

    Ben

    Wednesday, July 27, 2011 4:36 PM

Answers

  • Hi Ben,

    Hmmm.  It's working for me.  My test rule successfully updates the DBA value of 'Yes' to 'No' when I change the value of CustomerType.  Can you describe exactly how you have the second rule defined?

    Brian


    Brian Barnett, Profisee, www.profisee.com
    • Marked as answer by Ben K Ng Tuesday, August 2, 2011 2:17 PM
    Friday, July 29, 2011 1:46 PM
  • Thanks Brian, you're right, it does work.

    I managed to figure out why this rule wasn't firing properly. I was actually testing these changes on a Customer entity with 40 odd business rules in. I'd changed the priority so that these two rules ran first.

    Towards the bottom of the list, there was another rule that also set IsApproved to the same 'No' value but the condition was based on a separate DBA changing. If this rule was excluded, everything worked as expected and I've since rolled these two rules into one.

    I thought that the Priority would determine the order which the rules run but this doesn't seem to be the case. I assume that this just determines what error appears in the Validation issues page...

     

     

    • Marked as answer by Ben K Ng Tuesday, August 2, 2011 2:17 PM
    Tuesday, August 2, 2011 2:17 PM

All replies

  • Hi Ben,

    Make sure the CustomerType attribute has "Enable changed tracking" checked and the change tracking group matches the group selected in the business rule.  Go, to the Attribute edit screen in System Administration to check this.

    HTH,

    Brian

    Profisee, www.profisee.com

     


    Thanks, Brian Profisee, www.profisee.com
    • Proposed as answer by Brian Barnett Wednesday, July 27, 2011 7:53 PM
    Wednesday, July 27, 2011 7:52 PM
  • Hi Brian,

    Thanks for the fast reply.

    Change tracking is enabled on the CustomerType attribute. The rule fires properly when I change the action to change the value of a text based column. It also works if I manually change IsApproved to NULL and use "Defaults to" in the action so the problem is definitely associated with updating a NOT NULL DBA with the 'Change Value equals' action.

    Thanks

    Ben

     

    Thursday, July 28, 2011 7:34 AM
  • Hi Ben,

    Hmmm.  It's working for me.  My test rule successfully updates the DBA value of 'Yes' to 'No' when I change the value of CustomerType.  Can you describe exactly how you have the second rule defined?

    Brian


    Brian Barnett, Profisee, www.profisee.com
    • Marked as answer by Ben K Ng Tuesday, August 2, 2011 2:17 PM
    Friday, July 29, 2011 1:46 PM
  • Thanks Brian, you're right, it does work.

    I managed to figure out why this rule wasn't firing properly. I was actually testing these changes on a Customer entity with 40 odd business rules in. I'd changed the priority so that these two rules ran first.

    Towards the bottom of the list, there was another rule that also set IsApproved to the same 'No' value but the condition was based on a separate DBA changing. If this rule was excluded, everything worked as expected and I've since rolled these two rules into one.

    I thought that the Priority would determine the order which the rules run but this doesn't seem to be the case. I assume that this just determines what error appears in the Validation issues page...

     

     

    • Marked as answer by Ben K Ng Tuesday, August 2, 2011 2:17 PM
    Tuesday, August 2, 2011 2:17 PM
  • Business rule priority does determine the order the rules are processed (run).
    Brian Barnett, Profisee, www.profisee.com
    Wednesday, August 3, 2011 6:51 PM