Add a control to pass the object query parameter to Unwired Server. Define a screen that displays the results returned from the Unwired Server cache.
- Define a control that passes the object query parameter to Unwired Server from the screen (named Cached Data) that contains the menu item (named FindBenefitsInfo) that invokes the findByDeptId object query:
- Select an EditBox control and click in the control area.
- Name the EditBox DeptId.
- From the Properties view, select New key and name it DeptIdKey. Click OK.
- Select the FindBenefitsInfo menu item, and from the Parameter Mappings tab, map parameters to input keys defined for the controls. For example, map the deptIDLP parameter to the DeptIdKey key.
- Define a screen that displays the results of the findByDeptId object query:
- From the Flow Design window, add a new Screen and name it Results. Select the Screen Design tab.
- Drag and drop a Listview control onto the control area.
- Select the Flow Design tab and double-click the Cached Data screen to open it.
- Select the FindBenefitsInfo menu item, and in the Properties view, in General properties, select Online Request as the Type and in the Details section, select Results as the Success screen.
The Cached Data screen now sends successful results returned by the Unwired Server cache to the Results screen. The Flow Design window indicates the connection between the screens.
- Configure the Results screen to display the results. In this example, the Employee MBO, contains seven attributes that identify the employee and their benefits. Create a Listview with a cell for each attribute to display the results returned from the cache as a list:
- From the Flow Design window, double-click the Results screen to display it in the Screen Design window.
- Select the control area, select the General tab in the Properties view, and for the Input Data Binding Key select MBOName_findByDeptId_resultSetkey (where MBOName is the name of the MBO).
- Select the Cell tab, then click Add to add cell line 0.
- Select Add in the "Fields for cell line 0" section, then select the Employee_emp_fname_attribKey key. Click OK.
This maps cell line 0 with the id attribute for the Emp MBO results returned by the object query.
- Repeat steps 3 and 4 again for the remaining employee's last name and benefits related attributes.
- Select the Problems view, and verify there are no errors.
You now have a deployable workflow package that passes the DeptID value to the findByDeptId object query which returns matching cached results and displays them in the Results screen.