Hello All, How can we use like java reflexion in SAIL to can call dyn

Hello All,

How can we use like java reflexion in SAIL to can call dynamically a rule expression or function from a rule expression?
For example something like that: invoke("rule!name",{param1;param2})
If it´s not ootb is there any plugin to do that?

thank you in advance for you answer,
Best regards.
Alex

OriginalPostID-183169

OriginalPostID-183169

  Discussion posts and replies are publicly visible

Parents
  • Hi Alex, I now understand what you meant. You want to pass the function name rather than a reference to the function. As far as I know, there is no OOTB solution for this. But, it can be done via creating custom Appian plugin code. In your Java method you need to take the rule or function name as input and then get the actual function or rule name. There are APIs for getting a rule or constant by name. Refer ContentService class in Appian's Java API. There are some methods which can return you the rule or function by name. Once you get that function or rule, you can then pass the parameters to it and evaluate it in Java code and return the result.
Reply
  • Hi Alex, I now understand what you meant. You want to pass the function name rather than a reference to the function. As far as I know, there is no OOTB solution for this. But, it can be done via creating custom Appian plugin code. In your Java method you need to take the rule or function name as input and then get the actual function or rule name. There are APIs for getting a rule or constant by name. Refer ContentService class in Appian's Java API. There are some methods which can return you the rule or function by name. Once you get that function or rule, you can then pass the parameters to it and evaluate it in Java code and return the result.
Children
No Data