SmartObject Properties vs Method Parameters
When assigning the method bindings of our new SmartObject method. The question is:
When do we need to create and use SmartObject method parameters?
And when do we need to create and use SmartObject properties?
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.
K2 provides you with four options for bindings, SmartObject property, SmartObject method parameter, Specific value and System value as shown above. In most cases you will be able to use the existing SmartObject properties. But if your method requires additional input parameters you will have to create SmartObject method parameters and map them accordingly.
The parameter will then serve as placeholders that you will be able to assign data to on the Input Mappings screen when you configure your method call as below.
On the other hand, you will note that if you would assign the return property to a SmartObject method parameter as the one below:
There will be no return property to select in the Context Browser.
If you use a SmartObject property instead:
You will now see that you can select it as a return property in the Context Browser.
So to summarize, you can only use SmartObject method parameters when you are assigning the bindings to your method input properties. On the return properties you will then need to use a SmartObject property to be able to select it in the Context Browser.