Can one re-sequence the Business Process Rule entries?

I'm thinking that since a business process rule runs until it hits a "true" condition, sorting the entries by most likely to least likely might speed up the execution.  For the rules I've created, 50 entries is the largest so maybe having the most likely be the early in the list wouldn't help a lot.

Is there a way to re-sequence the list of conditions or is this like the process action conditions where you have to re-write the list if something at the beginning needs to be changed?  (Yes, I know that request has been logged already and we're waiting for implementation)

  • Hello Bud,

    At the moment the Sugar application doesn't support re-ordering the Conditions of a Business Process Rule through the user interface.

    I drew up a very simple Business Process Rule with only two Conditions and reviewed the value in the database, but it's stored as JSON, so it looks like this:

    {"base_module":"Accounts","type":"single","columns":{"conditions":[{"module":"Accounts","field":"annual_revenue"}],"conclusions":[""]},"ruleset":[{"id":1,"conditions":[{"value":[{"expType":"CONSTANT","expSubtype":"string","expLabel":"\"1,000,000\"","expValue":"1,000,000"}],"variable_name":"annual_revenue","condition":"==","variable_module":"Accounts"}],"conclusions":[{"value":[{"expType":"CONSTANT","expSubtype":"boolean","expLabel":"TRUE","expValue":true}],"conclusion_value":"result","conclusion_type":"return"}]},{"id":2,"conditions":[{"value":[{"expType":"CONSTANT","expSubtype":"string","expLabel":"\"1,000,000\"","expValue":"1,000,000"}],"variable_name":"annual_revenue","condition":"!=","variable_module":"Accounts"}],"conclusions":[{"value":[{"expType":"CONSTANT","expSubtype":"boolean","expLabel":"FALSE","expValue":false}],"conclusion_value":"result","conclusion_type":"return"}]}]}

    - This represents, Accounts > Annual Revenue == 1,000,000 return TRUE else Annual Revenue != 1,000,000 return FALSE.

    As you can see, this is certainly not the most user-friendly.  While it is definitely possible to re-order this directly in the database, the margin for error is quite high and could lead to an error or unexpected consequences, if a mistake were to occur.

    For the time being, I would recommend waiting for the re-order enhancement request to be fulfilled.

    Regards,

    Dan Kallish

    Advanced Support Engineer

    SUGARCRM

    Learning Resources: http://support.sugarcrm.com | http://university.sugarcrm.com | http://community.sugarcrm.com