Aaron Dunlop

RMA - Generic Recursive Template

Discussion created by Aaron Dunlop on Jul 31, 2013
Latest reply on Aug 14, 2013 by Aaron Dunlop

In the RMA there is a way to expose your object model to allow the users to add condition's to each rule they create by drilling down into the object model.

I have done this before however cannot remember the exactly how to set this up correctly.


Basically I want the user to be able to select the first lot of class properties from the 'top most' class which (when selecting a complex type within this class) would recuse and show the next lot of class properties until the terminating statement of property would show the is equal to value.


eg: obj.obj.... obj.prop...


This is actaully a challenge question within the RMA training book. but I cannot remember how I did it.


Currently I have the following: Templates

  • Ruleset Template  [Ruleset Template]
  • Rule Template  [Rule Template]
  • Condition Template [Code Template]
  • Operation Template [Code Template]

Recursion occurs on the Condition Template. I have an if statement If its not = a normal type (integer, string etc) then recurse the Condition Template (using a Template List Provider).

Else Supply the Operation Template which simply just provides a Property Type, Type Operator and a Type Value for the user to select.

The Problem I’m having is when It recurses it doesn’t seem to push the Arguments down the recursion even though I have specified it too in the subTemplateArgument overrides. Any help here appreciated.