Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
7 subscribers
Views
3303 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
Hello All, How can we use like java reflexion in SAIL to can call dyn
alexis gutierrez
over 10 years ago
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
0
chetany
A Score Level 1
over 10 years ago
An example: Create a rule named TEST_DYNAMICALLY_CALL_RULE with input params 'ruleOrFunref'(Any Type) and ''params (Number - array)'. Define the rule as: ri!ruleOrFunRef(ri!params). Now you can call this rule from another rule and pass the function or ruleName. For eg: you can call it like this:
rule!TEST_DYNAMICALLY_CALL_RULE(
fn!sum,
{1,2,3}
).
So, here we are passing a rule reference to another rule with the parameters required. This paradigm is quite common in Functional Programming languages(
en.wikipedia.org/.../Functional_programming)
where a function takes other functions as arguments or returns a function (languages like LISP, JavaScript, Haskell, Clojure etc. support this.) I hope this is exactly what you wanted to know about.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
chetany
A Score Level 1
over 10 years ago
An example: Create a rule named TEST_DYNAMICALLY_CALL_RULE with input params 'ruleOrFunref'(Any Type) and ''params (Number - array)'. Define the rule as: ri!ruleOrFunRef(ri!params). Now you can call this rule from another rule and pass the function or ruleName. For eg: you can call it like this:
rule!TEST_DYNAMICALLY_CALL_RULE(
fn!sum,
{1,2,3}
).
So, here we are passing a rule reference to another rule with the parameters required. This paradigm is quite common in Functional Programming languages(
en.wikipedia.org/.../Functional_programming)
where a function takes other functions as arguments or returns a function (languages like LISP, JavaScript, Haskell, Clojure etc. support this.) I hope this is exactly what you wanted to know about.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data