The following examples are based on the standard Java classes for simple objects. We have used classes from the demo server included with DevTest that are easy to reproduce in your environment.
Simple DTO Object Scenario 1
A simple DTO com.itko.examples.dto.Address has been loaded in the COE using a Dynamic Java Execution step. The Address class has simple properties only.
For a simple DTO, parameter values can be entered into the Data Sheet panel as fixed values or properties. In the previous example, city could be set equal to the property currentCity.
To enter parameters using the DTO setters in the Call sheet panel:
The method runs and COE opens in the Call tab.
Simple Java Object Scenario 2
A simple Java object, java.util.Date, has been loaded in the COE using a Dynamic Java Execution step.
In this case, Expert Mode must be used, because the Date type is not a DTO. In fact the COE forces Expert mode.
But we can still enter parameter values and invoke methods. In the previous example, we execute the parse method, which requires one input parameter. We have entered it as a string value, 9/1/2007.
Note: In Expert Mode, we use the Null or Use Property check box to denote the parameter type. If neither is selected, fixed value is entered. We would not use the {{ }} property syntax here. Even if we were entering a property rather than a string value, we would enter only the property name.
Because we are in Expert Mode, we can add inline filters and assertions.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|