Use the following example to assist you in designing a business process that responds to requests.
Example Request Response Interface
To create a request response interface:
Define input and output parameters for the service operation:
Select the Service Interface tab in the Business Process service editor.
Select the operation on the service interface.
Expand the Operation Parameters section and add the following parameters:
Save the service. Select File|Save from the main menu bar.
Select the Business Process tab to display the canvas.
Rename the operation1Request interface. Select operation1Request and change the name to Receive Request in the Properties panel.
Add an Assign activity:
Click inside the Business Process canvas and then select the Tool Palette using the Fast View shortcut bar.
Drag Assign from the Activities palette and drag it after the Receive Request interface.
Define the Source and Target variables for the Assign:
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.
Drag the output from the Local Variables list in the Business Process Variables section to the Target column in the Properties panel.
Define an expression for the Assign as in the following example:
Select the Assign activity on the canvas and then select the Assign tab in the Properties panel.
Right-click inside the Expression editor and select String Functions|concat from the context menu.
Right-click inside the editor again and select Generic Variables and Constants|string constant from the context menu.
Rename the string constant operator to receive request .
Select receive request and then select the Bind Source Text checkbox in the Properties panel.
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.
Connect the input operator to the upper input node of the concat operator.
Connect the receive request operator to the lower input node of the concat operator.
Connect the output node of the concat operator to the output operator.
Save the service. Select File|Save from the main menu bar.
Add a Send Response interface:
Select Send Response from the Logic palette and drag it on to the canvas after the operation1Request.
Define the Send Response operation properties:
Select the Send Response activity on the canvas.
In the Properties panel, select the operation from the Operation drop-down list that corresponds to the Receive activity in your business process.
This action links the Receive and Send activities into a single operation.
Return to the Business Process canvas. Click the Business Process tab.
Connect the second flow of execution. Connect Receive Request interface to e to Assign, and Assign to Send Response.
Add an Assign activity:
Click inside the Business Process canvas and then select the Tool Palette using the Fast View shortcut bar.
Drag Assign from the Activities palette and drag it after the Receive Request interface.
Define the Source and Target variables for the Assign:
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.
Drag the output from the Local Variables list in the Business Process Variables section to the Target column in the Properties panel.
Define an expression for the Assign as in the following example:
Select the Assign activity on the canvas and then select the Assign tab in the Properties panel.
Right-click inside the Expression editor and select String Functions|concat from the context menu.
Right-click inside the editor again and select Generic Variables and Constants|string constant from the context menu.
Rename the string constant operator to send response .
Select send response and then select the Bind Source Text checkbox in the Properties panel.
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.
Connect the input operator to the upper input node of the concat operator.
Connect the send response operator to the lower input node of the concat operator.
Connect the output node of the concat operator to the output operator.
Save the service. Select File|Save from the main menu bar.
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