How to create an expression rule in which pass another exp rule as rule input

Certified Senior Developer

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

Parents
  • 0
    Certified Lead Developer

    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.

  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    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

     

     

  • 0
    Certified Lead Developer
    in reply to shreekrishnat0001

    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.

Reply
  • 0
    Certified Lead Developer
    in reply to shreekrishnat0001

    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.

Children
No Data