Hi,
Requirement is to create one expression rule in which I need to pass another expression rule as rule input,
I do not know what type of rule input to define.
Use Case - Have integration, need to call through expression rules, if integration is failed, I need to retry n number of time. and if it returns success, break the calling chain of integration
Thanks, in advance.
Shree Krishna
Discussion posts and replies are publicly visible
I'm not really clear what you're asking.
In an expression rule you can, trivially easily, call another expression rule within it, either to populate a local variable, or to define the output (or some part of the output). Likewise, any parent objects that call an expression rule, can call a different expression rule as part of the top-level expression rule call's rule inputs, presuming that the "lower" rule returns an output that will be compatible with the data type of the rule input it's being assigned into.
Hi Mike,
Thanks for your reply.
I have many integrations object exactly around 30 integrations and I need to try for all these integrations 5 times if any of this integration is failed,
for this requirement - I thought to create one common exp rule and no of attempts to try, this common exp rule will call all the integration object dynamically and try multiple times if integration giving us failed response.
expression rules are mostly like filter, reject, apply function, these are also accepting exp rules as rule input.
Hope the requirement is clear now.
any kind of guideline is appreciated.
Thanks,
Shree Krishna Tiwari
The best way to do this is to build a process model where the integration is called directly from the appropriate smart service node, and if it fails, handle it with a process loop (increment a counter and have the loop give up after a certain number). You can even add a 5 or 10 second timer in between each try.
I expect the approach you're trying in which you do it all within some complex nested expression structure is going to result only in frustration on your end.
There is this: https://docs.appian.com/suite/help/23.1/expression-advanced-evaluation.html
But I am not sure whether that fits your use case. In general, you can pass references to expressions to a rule input of type "ANY".
In this blog post, I also explain how to use this feature: https://appian.rocks/2022/09/19/building-customisable-components/