Hi Team,
I have a requirement to execute an expression rule by retrieving the rule name from the database. To provide a background on the ask: We have a landing page where tasks from various other applications/line of business is displayed. So every application designer would have to create an expression rule to return their tasks and then plugin to our common or parent expression rule. The parent rule consolidates all the tasks data from various applications and then display it in the grid. But the problem here is, one application might be in DEV phase, one in QA and another in UAT, so during the deployment there is always a problem due to the missing precedents and we have to comment out that rule that's not present in higher env and then uncomment it back. So in order to resolve this the business wanted to save all the rule names pertaining to each application in the DB and dynamically retrieve the rule name from DB and execute it.
I understand that we can pass the rule reference in the type "ANY", but in my case the rule name is saved as Text in DB.
Any ideas on this is appreciated.
Thanks
Discussion posts and replies are publicly visible
Is there any way to execute an expression rule by its UUID/Name. The UUID/Name of the rules to be executed will be saved in the DB, during the runtime the system should read the UUID/Name and execute the rule corresponding to it.
Hi Actually you can execute the rule by its UUID/Name.
Yeah as I mentioned earlier, it is possible to do with the apply function.
Though I do get the impression that Appian may want us to move away from using this function given the blurb they put at the too strongly suggesting to use forEach instead.
Not required to use apply function
Interesting. Care to elaborate?
For those wondering, here's an example of what I meant using the apply function in combination with the getrulereferencebyname in the Content Tools plugin.
Again, I don't recommend this approach as it becomes very difficult to find dependencies in your application and troubleshooting becomes difficult. The API approach is more robust IMO.
a!localVariables( apply(getrulereferencebyname("S_DynamicRule"), {""}) )
Hi! Can you please elaborate on this?