I need to check if a function exists and then call it, using its name as a reference for both operations. I know that the functions doesruleexist and rulereferencebyname exist, but I don't know which plugin they belong to or if there is an alternative.
PS: Due to business restrictions, I cannot use externalize() and internalize().
Discussion posts and replies are publicly visible
May i know your use case to understand better?
I have a long list of rules that have the same functionality: validating certain data as appropriate. Instead of using a huge choose(), I want to rely on this plugin that I know exists and ask if the name of the rule exists to execute the rule, since they all return the same structure and receive the same parameters. The issue is in the intermediate rule, where the choose is located.
Got you!doesruleexist and rulereferencebyname this functions are part of Appian Solutions Plug-in
Yesss, This is it, thank you very much.
Recommendation -> Use the plugin approach for 15+ validation rules with frequent additions and standard input/output contracts. Stick with choose() for fewer than 10-15 validation types where you need explicit visibility of all options, easier debugging, and strict governance compliance.
Shubham Aware said:Stick with choose()
FWIW, choose() has been completely and utterly replaced by a!match(). I know of zero use cases where it's still necessary to use choose() instead of the newer, more flexible, and safer, a!match().
From a governance perspective, it isn't a good idea to use an unsupported plugin (or undocumented function, like eval) in production. Any Appian upgrade or plugin change could break your code without warning and without a way to revert. So be very careful with this plugin in production.
eval
From the plugin's description:None of the functions or smart services in this plugin should be used for any other purpose, nor are they verified to work outside of their usage in Appian-built solutions and the Solutions Customization Suite.
With that said, there are some excellent test-related use cases for it in lower environments.