Hi, I'm trying to call an expression through a query result, is there a

Hi,
I'm trying to call an expression through a query result, is there any way for it to be done? Like, say, calling an expression by it's uuid?

Thanks

OriginalPostID-217820

OriginalPostID-217820

  Discussion posts and replies are publicly visible

Parents
  • I know passing rule references to other rules as rule inputs. Consider the following rule which takes in a rule reference as input and executes it inside.

    Rule:
    executeMyRule(ruleToBeExecuted<AnyType>, dataToBePassed<AnyType>){
    apply(ri!ruleToBeExecuted, {ri!dataToBePassed})
    }

    And we can call this rule as follows...
    rule!executeMyRule(fn!dollar, "345")
    rule!executeMyRule(fn!dollar, {"123", "345"})

    This procedure can be used to create application level common rules where the rules to be executed/applied are not decided at design time but rather decided at run time. A most common use-case is to pass formatter rules to a SAIL component which applies the format passed in as a rule input.

    If you want to call an expression through a query result, can you see any possibility of getting rule references(rule!ruleName as string) from database/query and pass it to the above rule ?

    I might have misinterpreted your question but felt like worth sharing.
Reply
  • I know passing rule references to other rules as rule inputs. Consider the following rule which takes in a rule reference as input and executes it inside.

    Rule:
    executeMyRule(ruleToBeExecuted<AnyType>, dataToBePassed<AnyType>){
    apply(ri!ruleToBeExecuted, {ri!dataToBePassed})
    }

    And we can call this rule as follows...
    rule!executeMyRule(fn!dollar, "345")
    rule!executeMyRule(fn!dollar, {"123", "345"})

    This procedure can be used to create application level common rules where the rules to be executed/applied are not decided at design time but rather decided at run time. A most common use-case is to pass formatter rules to a SAIL component which applies the format passed in as a rule input.

    If you want to call an expression through a query result, can you see any possibility of getting rule references(rule!ruleName as string) from database/query and pass it to the above rule ?

    I might have misinterpreted your question but felt like worth sharing.
Children
No Data