How to modify expression rule without break compatibility

Certified Lead Developer
I have an expression rule formatList that takes 1 parameter formatList(markets). Now I want to modify this rule by adding one more parameter param2 { formatList(markets,param2) }. This expression rule is being used in a process model. If I add new parameter in this rule it will cause exception (formatList has 2 parameters, but instead passed 1 parameters) in inflight process model ( process already started and not completed). Is there any way to avoid this exception? do I have to create new expression rule instead of modify existing one?

OriginalPostID-239110

  Discussion posts and replies are publicly visible

Parents
  • This type of scenarios can be prevented using label value pair while calling the expression rules.
    For e.g. rule!rule_name(param1Label:param1Value, p2Label:p2Value)
    This way, when you add another parameter to your expression, it take null value by default and the 'incorrect number of param' exception gets handled.
    Ofcourse- you need to handle null pointer exception in rule definition..
Reply
  • This type of scenarios can be prevented using label value pair while calling the expression rules.
    For e.g. rule!rule_name(param1Label:param1Value, p2Label:p2Value)
    This way, when you add another parameter to your expression, it take null value by default and the 'incorrect number of param' exception gets handled.
    Ofcourse- you need to handle null pointer exception in rule definition..
Children
No Data