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
  • Thank you Chetany but I know this "part of solution". I mean part because your solution is dynamic but is not a total reflexion approach. You are not passing the function name but the pointer on this function.
    Your solution will be reflexion programming if you will call the function sum like this: rule!TEST_DYNAMICALLY_CALL_RULE(
    "fn!sum",
    {1,2,3}
    )
    To be sure that is dynamic : when you click on precedent from the rule that call TEST_DYNAMICALLY_CALL_RULE the function or rule passed in parameter has to be ignored.
    So do you know how I can do it?
Reply
  • Thank you Chetany but I know this "part of solution". I mean part because your solution is dynamic but is not a total reflexion approach. You are not passing the function name but the pointer on this function.
    Your solution will be reflexion programming if you will call the function sum like this: rule!TEST_DYNAMICALLY_CALL_RULE(
    "fn!sum",
    {1,2,3}
    )
    To be sure that is dynamic : when you click on precedent from the rule that call TEST_DYNAMICALLY_CALL_RULE the function or rule passed in parameter has to be ignored.
    So do you know how I can do it?
Children
No Data