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
  • Certified Associate Developer
    You should have to declare ri! variables in child interface its a good practice Some of the advantages of it are as below

    1) If any operations need to be done on the variables before getting its final value, Then in that case u should just need to do this in the parent interface and simply pass the modified values in child interface. This makes code more feasible because next time when u are checking the logic, You don't need to dig inside each n every rules u created

    2) If you are testing the interface and want to check what value your variables are storing, In that case your ri! variable helps you a a lot. Otherwise you have to create additional text box for storing and checking the local!variables value

    3) In future if you need to enhance your code in such a way that some data needs to be taken from process model, Then you don't need to add any additional ri!variables under your interface(As it will already be available)

    4)ri!variables also help to figure out the lifetime of a variable i.e upto how many interfaces/rule that variable exists

    5) No chances of name Mismatch, That would be possible in case of local variable, etc
Reply
  • Certified Associate Developer
    You should have to declare ri! variables in child interface its a good practice Some of the advantages of it are as below

    1) If any operations need to be done on the variables before getting its final value, Then in that case u should just need to do this in the parent interface and simply pass the modified values in child interface. This makes code more feasible because next time when u are checking the logic, You don't need to dig inside each n every rules u created

    2) If you are testing the interface and want to check what value your variables are storing, In that case your ri! variable helps you a a lot. Otherwise you have to create additional text box for storing and checking the local!variables value

    3) In future if you need to enhance your code in such a way that some data needs to be taken from process model, Then you don't need to add any additional ri!variables under your interface(As it will already be available)

    4)ri!variables also help to figure out the lifetime of a variable i.e upto how many interfaces/rule that variable exists

    5) No chances of name Mismatch, That would be possible in case of local variable, etc
Children
No Data