Declaring Rule Inputs in child interface

A lot of child interfaces don't have variables(ri!) declared. Does not declaring ri! in child interface cause any performance or any such issues? If yes, then this should be made a part of best practice. 

  Discussion posts and replies are publicly visible

Parents
  • Hello!

    I'm not sure I understood a single part of question. What is a child interface? Usually, interface display some data and collect some input from the user. What will be displayed on interface without incoming parameters? Where to input will be saved?
  • A child interface is a separate interface/rule called by a parent, which relies on the inherited variables (both local and ri!) from the parent. It will work since the interpreting engine simply assumes the local! and ri! variables called in the child are referring to those defined in the parent, but as others have noted here it's sloppy and not easy to test or maintain.
  • OMG! I tried and it works. The called interface took value from the calling interface. This is just ugly. In Java or other programming variable visibility is controlled by specific tools, but it is always clear on the level of the element being called what variable it is accessing. Here it will be just accessing nearest context available variable by name.

    In this case I don't see any design issues if someone decided to not used any parameters when splitting an interface. But I assume such decision can be made in absolute certainty that the child will always be a child of this parent and no need in separate testing. Otherwise usual way is to parametrise a rule either it is interface or expression.

    Usually it cannot cause any performance issues as the data for an interface is limited.
Reply
  • OMG! I tried and it works. The called interface took value from the calling interface. This is just ugly. In Java or other programming variable visibility is controlled by specific tools, but it is always clear on the level of the element being called what variable it is accessing. Here it will be just accessing nearest context available variable by name.

    In this case I don't see any design issues if someone decided to not used any parameters when splitting an interface. But I assume such decision can be made in absolute certainty that the child will always be a child of this parent and no need in separate testing. Otherwise usual way is to parametrise a rule either it is interface or expression.

    Usually it cannot cause any performance issues as the data for an interface is limited.
Children
No Data