Double-click bpPsSelect in the Projects window to open the Business Process Designer to the bpPsSelect Business Process.
Create the bpPsSelect FileClient.receive -> FileClient.write rule.
Add a Business Rule to the link between FileClient.receive and FileClient.write and double-click the new Business Rule icon to open the Business Rule Designer.
From the Business Rule Designer toolbar String menu, select string literal.
Enter Selecting record(s) from db_employee table via Prepared Statement select...as the String value in the string literal method box.
Map the Selecting record(s) from db_employee table via Prepared Statement select... output node of the string literal method box, to text under FileClient.write.input in the Input pane (right pane) of the Business Rule Designer.
Create the FileClient.write -> otdDB2.Select_psPSSelectAll rule.
Add a Business Rule to the link between FileClient.write and otdDB2.Select_psPSSelectAll and double-click the new Business Rule icon to open the Business Rule Designer.
From the Business Rule Designer toolbar Number menu, select number literal.
Enter 0.0 as the number value.
Map the 0.0 output node of the number literal method box, to EMP_NO under otdDB2.Select_psPSSelectAll.Input -> input in the Input pane of the Business Rule Designer.
Create the Records found -> otdInputDTD_DBemployees.marshal rule in Case 1 of the Decision branching activity.
Add a Business Rule to the link between the Records found input node and otdInputDTD_DBemployees.marshal and double-click the new Business Rule icon to open the Business Rule Designer.
Map nodes under otdDB2.Select_psPSSelectAll.Output -> output -> Select_psPSSelectAllPSResponseTypeList in the Output pane of the Business Rule Designer, to the corresponding nodes under otdInputDTD_DBemployees.marshal.Input -> DBemployees -> X_sequence_A in the Input pane of the Business Rule Designer, as follows:
EMP_NO -> EmpNo
LAST_NAME -> Lastname
FIRST_NAME -> Firstname
RATE -> Rate
LAST_UPDATE -> LastDate
Create the otdInputDTD_DBemployees.marshal -> FileClient.write rule in Case 1 of the Decision branching activity.
Add a Business Rule to the link between otdInputDTD_DBemployees.marshaland FileClient.write within the Records found element, and double-click the new Business Rule icon to open the Business Rule Designer.
Map contents under otdInputDTD_DBemployee.marshal.Output, in the Output pane of the Business Rule Designer, to text under FileClient.write.Input3 in the Input pane of the Business Rule Designer.
Create the Norecord -> FileClient.write rule in Case 2 of the Decision branching activity.
Add a Business Rule to the link between No record input node and FileClient.write within the Records found element, and double-click the new Business Rule icon to open the Business Rule Designer.
From the Business Rule Designer toolbar String menu, select string literal.
Enter Records Not Found as the String value in the string literal method box.
Map the Records Not Found output node of the string literal method box, to text under FileClient.write.Input2 in the Input pane (right pane) of the Business Rule Designer.
Create the Decision Gate Properties for the Decision Case 1 and Case 2.
Double-click the red Case 1 icon between Decision input node and Records found input node.
The Decision Gate Properties Editor appears.
From the Decision Gate Properties Editor toolbar Operator menu, select Settings.
The Method Pallette appears.
From the Method Palette, click the Operator tab and select the greater than option (for Case 1) and select the lesser or equal option (for case 2). Click Close.
The new options are added to the Operator menu.
From the Decision Gate Properties Editor toolbar Operator menu, select greater than.
The greater than method box is added to the editor's canvas.
Map rowCount under otdDB2.Select_psPSSelectAll.Output -> output in the left pane of the Decision Gate Properties Editor, to the number1 input node of the greater than method box.
Double-click the number2 field of the greater than method box, and change the value to 0.0.
Map 00 output node of the greater than method box, to the Result node in the right pane of the Decision Gate Properties Editor.
From the Order of Execution field, select Case 2.
From the Decision Gate Properties Editor toolbar Operator menu, select lessor or equal.
The lessor or equal method box is added to the editor's canvas.
Map rowCount under otdDB2.Select_psPSSelectAll.Output -> output in the left pane of the Decision Gate Properties Editor, to the number1 input node of the lessor or equal method box.
Double-click the number2 field of the lessor or equal method box, and change the value to 0.0.
Map 00 output node of the lessor or equal method box, to the Result node in the right pane of the Decision Gate Properties Editor.
Click OK to close the Decision Gate Properties Editor.
The Case 1 and 2 icons change from red to green to indicate that the properties have been set.
Create the Decision.end -> FileClient.write rule.
Add a Business Rule to the link between the Decision.end element and FileClient.write, and double-click the new Business Rule icon to open the Business Rule Designer.
From the Business Rule Designer toolbar String menu, select string literal.
Enter Select Done as the String value in the string literal method box.
Map the Select Done output node of the string literal method box, to text under FileClient.write.Input3 in the Input pane of the Business Rule Designer.
Save your project.