Creating a Send Response Business Process Interface

Use the following example to design a business process that sends responses.

Example Send Response Interface

Example Send Response Interface: An operation1Request flows to a Single-rule
which flows to two Assigns, one that processes a single rule hit and another that processes a single rule that does not
hit.

To create a Send Response interface:

  1. Create a business process service.

  2. Define input and output parameters for the operationRequest:

    1. Select the Service Interface tab in the Business Process service editor.

    2. Select the operation on the service interface.

    3. Expand the Operation Parameters section and add the following parameters:

    4. Service Operation Parameter Properties

      NameStyleDatatype

      input

      Simple

      string

      output

      Simple

      string

    5. Save the service. Select File|Save from the main menu bar.

  3. Select the Business Process tab to display the canvas.

  4. Add Single-rule logic to the business process:

    1. Click inside the Business Process canvas and then select the Tool Palette using the Fast View shortcut bar.

    2. Select Single-rule from the Logic palette and drag it on to the canvas.

    3. Define the single rule as in the following example:

      Example single-rule expression: "input is equal to hit"

      1. Select the Single-rule on the canvas.

      2. Rename the string constant in the Expression editor. Select string constant and change its Logical Name to hit in the Properties for the Operation panel.

      3. Replace the Select Variable in the Expression editor. Drag the input operation parameter from Interface Variables onto the Select Variable.

  5. Save the service. Select File|Save from the main menu bar.

  6. Add an Assign activity:

    1. Drag Assign from the Activities palette and drag it after the Single-rule.

    2. Define the Source and Target variables for the Assign:

      1. Select the Assign and drag the input parameter from the Local Variables list in the Business Process Variables section to the Source column in the Properties panel.

      2. Drag the output from the Local Variables list in the Business Process Variables section to the Target column in the Properties panel.

    3. Define an expression for the Assign as in the following example:

      Example expression for the Assign: input flows to the upper input node of concat and single hit rule flows to the lower
input node of concat, and concat output node flows to output.

      1. Select the Assign activity on the canvas and then select the Assign tab in the Properties panel.

      2. Right-click inside the Expression editor and select String Functions|concat from the context menu.

      3. Right-click inside the editor again and select Generic Variables and Constants|string constant from the context menu.

      4. Rename the string constant operator to single hit rule.

      5. Select single hit rule and then select the Bind Source Text checkbox in the Properties panel.

      6. Replace the Select Variable in the Expression editor. Drag input from the Local Variables list in the Business Process Variables section onto the Select Variable.

      7. Connect the input operator to the upper input node of the concat operator.

      8. Connect the single hit rule operator to the lower input node of the concat operator.

      9. Connect the output node of the concat operator to the output operator.

    4. Save the service. Select File|Save from the main menu bar.

  7. Add another Assign activity after the Single-rule:

    1. Drag Assign from the Activities palette and drag it after the Single-rule.

    2. Define the Source and Target variables for the Assign:

      1. Select the Assign and drag the input parameter from the Local Variables list in the Business Process Variables section to the Source column in the Properties panel.

      2. Drag the output from the Local Variables list in the Business Process Variables section to the Target column in the Properties panel.

    3. Define an expression for the Assign using the following example:

      Example expression for the Assign activity: input flows to upper input node of concat, single rule did not hit flows to
lower input node of concat, and concat output node flows to output

      1. Select the Assign activity on the canvas and then select the Assign tab in the Properties panel.

      2. Right-click inside the Expression editor and select String Functions|concat from the context menu.

      3. Right-click inside the editor again and select Generic Variables and Constants|string constant from the context menu.

      4. Rename the string constant operator to single rule did not hit.

      5. Select single rule did not hit and then select the Bind Source Text checkbox in the Properties panel.

      6. Replace the Select Variable in the Expression editor. Drag input from the Local Variables list in the Business Process Variables section onto the Select Variable.

      7. Connect the input operator to the upper input node of the concat operator.

      8. Connect the single rule did not hit operator to the lower input node of the concat operator.

      9. Connect the output node of the concat operator to the output operator.

    4. Save the service. Select File|Save from the main menu bar.

  8. Connect the second flow of execution. Connect the upper hit node of the Single-rule to Assign, and the lower hit node of the Single-rule to the second Assign.

  9. Add a Send Response interface to the business process. Select Send Response from the Interface palette and drag it on to the canvas.

  10. Rename the Send Response interface. Select Send Response and change the name to operation1Request in the Properties panel.

    The response variable appears as Normal Response Variable.

  11. Save the service. Select File|Save from the main menu bar.

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com