K2 SmartForms Rule Interaction
When working with any K2 SmartForm project, you sometimes find that pieces of functionality mimic another or call the same procedures.
In K2 you can’t physically copy and paste rules, but you can execute one rule from within another rule.
This is really convenient when you have to execute the exact same set of conditions / functions from multiple control interactions, and it also makes later changes a lot simpler since the change needs to be done in only one place. When you need something extra to be done that the “base rule” doesn’t take care of you can just piggy-back it before or after the referenced rule as needed.
K2 Automated Testing Software
BenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.
In this example we have a form with different views. The actions from controls on both views populate the K2 ListView. When the “All Items” checkbox is changed we will execute the base rule (in this case the Change UW Drop-down List rule).
To execute another rule, you simply navigate to the “Actions” tab and scroll to the “Rule Interactions” tab. There you can select to either continue rule execution, stop rule execution or execute another rule.
You can set up your own conditions and/or actions before and/or after the rule interaction.
When you configure the rule interaction you gain access to all the rules set up on the current form including those from all the views on that form.
Your control will now execute both the actions you manually added as well as all rules from the rule you chose in the rule interaction configuration (“base rule”).
This approach can also be very useful when specific form rules need to be executed on the closing event of a subview (i.e to refresh a grid to show updated changes made in subview).
More about successful K2 SmartForms Projects
Great technology is made even better when it is applied correctly. Velocity IT has been providing K2 customers with experience and expertise they need to be successful. Read more…