# Client Request with Return Start (Synchronous)

If you specified that your business process starts when it receives a message from a client and a synchronous response is sent back to the client, that is using the Invoked synchronously via a Client Request with Return option, your Start node is displayed as shown in the following figure:

Note the following properties for the Client Request with Return group node:

- indicates that the design of this node is incomplete. To complete the design, see To Complete the Design of Your Client Request with Return Node Group.
- By default the name for the node is Client Request with Return. You can change the name in the following ways:

- Right-click the node name in the Design View and select Rename from the drop-down menu. Then enter a new name to replace Client Request with Return.
- Double-click the node name in the Design View, then enter a new name to replace Client Request with Return.
- Double-click either of the Client Request with Return icons in your business process to display one of the node builders. Click the name beneath the node builder icon and enter a new name to replace Client Request with Return.

After you add any node to your business process, you can design its properties and behavior by invoking the node builder and completing the tasks appropriate for that node. You can also add optional nodes between the Request and Return part of the Client Request with Return node. This allows you to process data or perform tasks after the message from the client is received and before the return is sent back to the client. For more information on how to add optional nodes to your Client Request with Return node, see Adding Nodes to Your Client Request with Return Node Group.

The following sections describe how to complete the design of your Client Request with Return nodes:

To Complete the Design of Your Client Request with Return Node Group

To complete the design of your Client Request with Return node, you need to complete the following sections:

- Specify General Settings for the Request Part of Your Node Group
- Specify Receive Data Settings for the Request Part of Your Node Group
- Specify General Settings for the Return Part of Your Node Group
- Specify Send Data Settings for the Return Part of Your Node Group

Specify General Settings for the Request Part of Your Node Group

1. Double-click the icon (upper icon) in the Client Request with Return node group in your business process.

The request part of the node builder is displayed. It contains two tabs: General Settings and Receive Data.

2. In the General Settings tab, enter a name in the Method Name field to specify the name of the method on this Client Request with Return node.

The name you assign to the method is the name of the method that is exposed via the Web Services Description Language (WSDL) when you make your business process available as a Web service. To learn more about how the methods in your project are exposed to clients, see Components of Your Application.

3. In the General Settings tab, click Add and select the type and format of the data your Client Request with Return node expects to receive from clients (that is, the data type for the method parameter). You can also specify a name for the method parameter.
4. Select the type and format of your data. The options available are:

- XML Types

Lists the XML Schemas that are available in your business process project and the untyped XMLObject and XMLObjectList data types. To learn how to import a Schema into your project, see Importing Files into the Schemas Project.

- Non-XML Types

Lists the Message Format Language (MFL) files available in your business process project and the untyped RawData data type. WebLogic Integration uses a metadata language called Message Format Language (MFL), based on XML, to describe the structure of non-XML data. Every MFL file available in your project is listed in Non-XML Types. Note that an XML Schema representation of each MFL file is built by WebLogic Workshop and is also available in the XML Types listing.

- Java Types

Lists Java primitive data types.

For more detailed descriptions of the data types, see Working with Data Types.

5. After you select the data type, click OK. The parameter type field is populated with that parameter type.

Note: If you selected typed XML or typed non-XML data type in the previous step, you can select the Validate box to have the incoming message validated against your specified schema before the message is received by the node. For more information about schemas, see Validating Schemas and Importing Files into the Schemas Project.

6. In the General Settings tab, continue clicking Add and select the type and format of your data until you have added as many parameters as you want to use.
7. To remove a variable from the node builder pane, select the variable in the list and then click Remove.

Note: This action removes the variable from the node builder, not from your business process. The variable is still included in your business process; it is visible in the Variables pane in the Data Palette.

Specify Receive Data Settings for the Request Part of Your Node Group

1. Click the Receive Data tab.

This tab allows you to define one or more variables to hold the data that your business process receives from clients.

2. If the data types of your method parameters and the data type of the variables you are going to use match, you can map your variables to the corresponding methods directly.

1. If not already selected, select the Variable Assignment option.

The Client Sends field is populated with the parameter(s) you specified on the General Settings tab.

2. If you want to assign a variable that you have already created in your project to the method parameters, under Select Variables to assign, click the arrow in the drop-down list and select it from the menu. The variable you select is added to the node builder pane.
3. If you want to create a new variable and assign it to the method parameter, click the arrow in the drop-down list, select Create new variable..., then follow the instructions in the To Create a New Variable in the Node Builder section.
4. If the data types of your method parameters and your variables match, close the node builder by clicking the X in the top right-hand corner.

3. If the data types of your method parameters and your variables are different, you can use the data mapping tool included in WebLogic Integration to map between heterogeneous data types. The data transformations you create using the tool are stored in Data Transformation Files (DTF). When DTFs containing your data transformations are built, they are built as controls. The controls expose transformation methods, which business processes invoke to map disparate data types.

1. To create a transformation map, select the Transformation option in the node builder.

The node builder transformation window displays the data types expected by your method in the Client Sends pane.

2. In Step 1 of the Transformation option window, click Select Variable to select one or more variables to be used.

Note: To remove a variable from the node builder pane, select the variable in the list and then click Remove. This action removes the variable from the node builder, not from your business process. The variable is still included in your business process; it is visible in the Variables pane in the Data Palette.

When designing a business process, you use a Transformation to create maps between disparate data types. Your project must contain an instance of a Transformation control (defined by a DTF file) for you to create the map.

3. If an appropriate instance of a Transformation control is not available in your project, you can create a new one by clicking Create Transformation to invoke the Transformation Mapping tool window. This automatically applies changes to the builder and opens a transformation editor in a new window.

The mapping tool displays a representation of the source schema and target schema in Source and Target panes. You can create a map between the data type of the method parameter and the data type of the variable, or variables, to which you assign the data. To learn how to create and test a map using the mapping tool, see the Guide to Data Transformation.

Note: To return to node builder, in the Application pane, double-click the JPD file.

4. If the appropriate instance of a Transformation control is available in your project, click Advanced... in the node builder. The Advanced Option window opens. In this window select the Control and Method. If the method arguments and return type matches those as selected in the Transformation pane, click OK.
5. To close the node builder, click the X in the top right-hand corner.

About Editing Node Configurations

You can edit the configuration at any node by opening the node builder and changing the existing specifications. If you add or remove variables in a node builder that already contains a configured transformation, you must edit or recreate the transformation. To do so, add or remove the variables, then click Edit Transformation or Create Transformation.

Note: When selecting a variable in a node builder's Transformation pane, and then clicking Remove, removes the selected variable from the node builder, not from your business process. The variable is still included in your business process; it is visible in the Variables pane in the Data Palette.

Specify General Settings for the Return Part of Your Node Group

1. Double-click the icon (lower icon) in the Client Request with Return node in your business process.

The request part of the node builder is displayed. It contains two tabs: General Settings and Send Data.

2. In the General Settings tab, enter a name in the Method Name field to specify the name of the method on this Client Receive with Return node.

The name you assign to the method is the name of the method that is exposed via the Web Services Description Language (WSDL) when you make your business process available as a Web service. To learn more about how the methods in your project are exposed to clients, see Components of Your Application.

3. In the General Settings tab, click Select and select the type and format of the data your Client Request with Return node expects to send to clients (that is, the data type for the return value).
4. Select the type and format of your data. The options available are:

- XML Types

Lists the XML Schemas that are available in your business process project and the untyped XMLObject data type. To learn how to import a Schema into your project, see Importing Files into the Schemas Project.

- Non-XML Types

Lists the Message Format Language (MFL) files available in your business process project and the untyped RawData data type. WebLogic Integration uses a metadata language called Message Format Language (MFL), based on XML, to describe the structure of non-XML data. Every MFL file available in your project is listed in Non-XML Types. Note that an XML Schema representation of each MFL file is built by WebLogic Workshop and is also available in the XML Types listing.

- Java Types

Lists Java primitive data types.

For more detailed descriptions of the data types, see Working with Data Types.

5. After you select the data type, click OK. The return type field is populated with the parameter types you added in the preceding steps.

Specify Send Data Settings for the Return Part of Your Node Group

1. Click the Send Data tab.

This tab allows you to define one or more variables to hold the data your business process send to clients.

2. If the data types of your return value and the data type of the variables you are going to use match, you can map your variables to the corresponding return value directly.

1. If not already selected, select the Variable Assignment option.

The Client Expects field is populated with the return type you specified on the General Settings tab.

2. If you want to assign a variable that you already created in your project to the return value, select it from the drop-down menu.
3. If you want to create a new variable and assign it to the method parameter, select Create new variable..., then follow the instructions in the To Create a New Variable in the Node Builder section.
4. If the data types of your return value and your variables match, close the node builder by clicking the X in the top right-hand corner.

3. If the data types of your return value and your variables are different, you can use the data mapping tool included in WebLogic Workshop to map between heterogeneous data types. The data transformations you create using the tool are stored in Data Transformation Format (DTF) files. When DTF files containing your data transformations are built, they are built as controls. The controls expose transformation methods, which business processes invoke to map disparate data types.

1. To create a transformation map, select the Transformation option.

The node builder transformation window displays the data types expected by your method displayed in the Client Expects pane.

2. In Step1 of the Transformation option window, click Select Variable to select one or more variables to be used.

Note: To remove a variable from the node builder pane, select the variable in the list and then click Remove. This action removes the variable from the node builder, not from your business process. The variable is still included in your business process; it is visible in the Variables pane in the Data Palette.

When designing a business process, you use a Transformation to create maps between disparate data types. Your project must contain an instance of a Transformation control (defined by a DTF file) for you to create the map.

3. If an appropriate instance of a Transformation control is not available in your project, you can create a new one by clicking Create Transformation to invoke the Transformation Mapping tool window. This automatically applies changes to the builder and opens a transformation editor in a new window.

The mapping tool displays a representation of the source schema and target schema in Source and Target panes. You can create a map between the data type of the method parameter and the data type of the variable, or variables, to which you assign the data. To learn how to create and test a map using the mapping tool, see Guide to Data Transformation.

Note: To return to node builder, in the Application pane, double-click the JPD file.

4. If the appropriate instance of a Transformation control is available in your project, click Advanced.... The Advanced Option window opens. In this window select the Control and Method. If the method arguments and return type matches those as selected in the Transformation pane, click OK.
5. To close the Mapping tool window, click the X in the top right-hand corner.

Note: To learn about changing the configuration you design in the Transformation pane of a node builder, see About Editing Node Configurations.

4. To close the node builder, click the X in the top right-hand corner.

In the Design View, the icon indicates that you completed the configuration and design of this node.

5. To save your work, select File —> Save.

### Adding Nodes to Your Client Request with Return Node Group

The Client Request with Return node functions as a combination of a Client Request node and a Client Receive node within a synchronous interaction. As such, you can add additional nodes in between the request and the return part of your Client Request Node but you cannot add any nodes that wait or block. To add a node to your Client Request with Return node, select the node you want to add in the Palette and drag and drop it into your Client Request with Return node.

The following nodes can be added:

- Client Response (See Create a Client Response Node in Your Business Process.)
- Control Send (See Create Control Nodes in Your Business Process.)
- Control Send with Return (See Create Control Nodes in Your Business Process.)
- Perform (See To Create a Perform Node in Your Business Process.)
- Decision (See To Create a Decision Node in Your Business Process.)
- Switch (See Creating Case Statements.)
- While Do (See To Add A While group to Your Business Process.)
- Do While (See To Add A While group to Your Business Process.)
- For Each (See To Add A For Each Node to Your Business Process.)

### Naming the Methods on Client Request with Return Nodes

The names that you assign to methods on your Client Request with Return nodes correspond to the names of the methods that are exposed via the Web Services Description Language (WSDL) when you make your business process available as a Web service. The name must be a valid Java class name.

Related Topics

Sending Messages to Clients

XQuery Statements

Handling Exceptions

Client Operations and Control Communication Methods

How Do I: Call a Business Process?