Sun Adapter for Oracle Tutorials

ProcedureCreate the jcdDelete Collaboration Business Rules

  1. From the Project window, double-click the jcdDelete Collaboration under your project's jcdALL node.

    The Java Collaboration Editor opens to the jcdDelete Collaboration.

  2. Create the Copy "Deleting record............" to FileClient_1.Text rule.

    1. From the Business Rules Designer toolbar's String menu, select Literal String.

      A String method box is added to the Business Rules Designer canvas.

    2. Double-click the value field of the String method box and enter Deleting record............ as the value.

    3. Map the output node of the String method box, to Text, under FileClient_1 in the right pane of the Business Rules Designer. To do this, click on the output node of the String method box, and drag your cursor to the Textnode, under FileClient_1 in the right pane of the Business Rules Designer.

      A visible link now connects the output node of the String method box and the Text node. The Business Rules tree now displays the new rule: Copy "Deleting record............" to FileClient_1.Text.

      Image shows the Java Collaboration Editor displaying
the Copy "Deleting record............" to FileClient_1.Text business rule.
  3. Create the FileClient_1.write rule.

    1. Click the rule icon on the Business Rules toolbar to add a new rule in the Business Rules pane.

    2. Right-click the FileClient_1 node in the left pane of the Business Rules Designer, and choose Select method to call from the popup menu.

      The method selection window appears.

    3. Select and double-click write() from the method selection window.

      The write method box appears in the Business Rules Designer canvas. The FileClient_1.write rule is added to the Business Rules tree.

      Image shows the Java Collaboration Editor displaying
the FileClient_1.write business rule.
  4. Create the otdOracle_1.Db_employee.delete(input.Text) rule.

    1. Click the rule icon on the Business Rules toolbar to add a new rule in the Business Rules pane.

    2. Right-click Db_employee under the otdOracle_1 node in the left pane of the Business Rules Designer, and choose Select method to call from the popup menu.

      The method selection window appears.

    3. Select delete(StringsWhere) from the method selection window.

      The delete method box appears in the Business Rules Designer canvas, and a link connects the Db_employee node in the left pane of the Business Rules Designer to the Db_employee input node of the delete method box.

    4. Map Text under the input node in the left pane of the Business Rules Designer, to the sWhere (String) input node of the delete method box.

      Image shows the Java Collaboration Editor displaying
the otdInformix_1.Db_employee.delete(input.Text) business rule.
  5. Create the Copy "Delete Done." to FileClient_1.Text rule.

    1. Click the rule icon on the Business Rules toolbar to add a new rule in the Business Rules pane.

    2. From the Business Rules Designer toolbar's String menu, select Literal String.

      A String method box is added to the Business Rules Designer canvas.

    3. Double-click the value field of the String method box and enter Delete Done as the value.

    4. Map the output node of the String method box, to Text, under FileClient_1 in the right pane of the Business Rules Designer.

      Image shows the Java Collaboration Editor displaying
the Copy "Delete Done." to FileClient_1.Text business rule.
  6. Create the FileClient_1.write rule.

    1. Click the rule icon on the Business Rules toolbar to add a new rule in the Business Rules pane.

    2. Right-click the FileClient_1 node in the left pane of the Business Rules Designer, and choose Select method to call from the popup menu.

      The method selection window appears.

    3. Select and double-click write() from the method selection window.

      The write method box appears in the Business Rules Designer canvas. The FileClient_1.write rule is added to the Business Rules tree.

  7. Click Save All to save your current changes.

    The completed jcdDelete Collaboration definition appears as follows:

    Image shows the completed jcdDelete Java Collaboration
Definition business rules.