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
  • Keyword or "label-value" is certainly preferable. Besides being more "change-proof", it also has better readability. You will need to type the parameter names and their values(and some may frown by saying that it takes a lot of typing), but the advantage is anyone who is reading the code later knows what parameter is taking what value.
    Passing parameters by keyword makes it very explicit, reduces the chances of errors. Imagine passing parameters by position, and let's say some other developer removes a parameter. Any rules you created that are dependent on the rule which changed will cause errors in your rules also.
    A point that you should keep in mind - Although passing parameters by keyword is a good practice and preferable, custom plugin functions do not support it. But expression rules created in Appian do support the keyword syntax.
Reply
  • Keyword or "label-value" is certainly preferable. Besides being more "change-proof", it also has better readability. You will need to type the parameter names and their values(and some may frown by saying that it takes a lot of typing), but the advantage is anyone who is reading the code later knows what parameter is taking what value.
    Passing parameters by keyword makes it very explicit, reduces the chances of errors. Imagine passing parameters by position, and let's say some other developer removes a parameter. Any rules you created that are dependent on the rule which changed will cause errors in your rules also.
    A point that you should keep in mind - Although passing parameters by keyword is a good practice and preferable, custom plugin functions do not support it. But expression rules created in Appian do support the keyword syntax.
Children
No Data