Importing/Exporting an Integration Process
Using BPEL4WS
Business Process Management supports the process definition part of BPEL4WS 1.1 (Business Process Execution Language for Web Services 1.1). For more information about BPEL4WS, see http://ifr.sap.com/bpel4ws.
You can use BPEL4WS as the exchange format for exporting an integration process to a non-SAP system and executing it there. Conversely, you can use BPEL4WS to import an integration process from a non-SAP system to SAP Exchange Infrastructure and execute it there. For information about restrictions to the BPEL4WS import and export functions, see SAP Note 709650.

BPEL4WS is not intended for importing or exporting integration processes between Integration Repositories. For this purpose, use the Integration Repository import function instead (see also: Transporting XI Objects).
The export exports the integration process definition as a BPEL4WS representation. Additionally, data types, message types, and operations referenced in the process definition are exported as a WSDL description.
You can display the BPEL4WS representation of the process definition to be exported in the Process Editor at any point (see also: Process Editor). You can display the corresponding data type definitions in the form of a WSDL description in the output area.
The process definition displayed in the Process Editor is exported as a file. The export file is a .zip file that contains the following files:
· <name>.bpel: Definition of the integration process as displayed in the BPEL4WS view
· <name>.wsdl: Referenced data types, message types, and so on
You can give the .zip file an arbitrary name. This name will also be used for the .bpel and .wsdl files as well. The .zip file does not contain any path specifications or directories.
To create a valid BPEL4WS description when you export an integration process, besides defining the integration process from the Integration Repository, you must also specify the partner link type and partner link.
A partner link type describes the relationship between two services and the role that each service has. For example, the partner link type BuyerSellerLink can define the roles Buyer and Seller. A partner link defines the services with which an integration process interacts. Each partner link has a partner link type. Multiple partner links can have the same partner link type, for example, a procurement process can interact with multiple vendors but use the same partner link type for all vendors.
Since this information is configured in the Integration Directory and is not part of the integration process definition in the Integration Repository, it cannot be exported automatically. Furthermore, a message interface can be used in different ways in different steps. For example, an integration process receives a purchase order request in a receive step by means of an message interface. In this case, you can define the partner link type PurchaseOrderRequest for the message interface. The same message interface can then be used in a send step later on in the integration process, for instance, to send a purchase response. You can then also define the partner link type PurchaseOrderResponse for the same message interface in this example.
However, defaults are generated for the partner link type, partner link, and role during the export. Ensure that you enter a name that is meaningful within this integration process for the partner link type at least.
The import only imports the BPEL4WS definition of an integration process. The import expects that the data types, message types, and message interfaces (WSDL operations) referenced in the process definition are already available in the relevant namespace, as explained in the following example. The data types and so on are not actually imported but are merely used to support the import procedure:

The process definition to be imported references a message Msg in the namespace http://sap.com/xiexample. The process definition is to be imported to the software component version MySWCV. The import expects that there is a namespace http://sap.com/xiexample in this software component version that contains the XI message type Msg.
The import expects a .zip file that contains a .bpel file and a .wsdl file. The three files must have the same name. The .zip file must not contain any path specifications or directories.
In Business Process Management, message-based container elements are used in the properties of certain steps and in correlations. These correspond to variables in BPEL4WS. A container element references a message interface that in turn references a message type. However, a BPEL variable references a message type directly. Therefore, the message interface specification is missing when a BPEL variable is imported.
It is advisable to create the required message interfaces in the Integration Repository before beginning the import. You can then assign them during the import by using an assistant. If you do not create the required message interfaces beforehand, the process definition will still be imported but the values between the various properties will be missing.
1.
In the
Process Editor editing area, choose
with the quick info Switch Editor ® BPEL4WS-Display.
The editing area displays the integration process definition as a BPEL4WS representation.
You can also
display the referenced data types, message types and so on as a WSDL
description. To do so, in the output area, choose
with the quick info Switch View ® WSDL Display.
2.
In the
editing area, choose
with the quick info Export
BPEL4WS.
An assistant is displayed.
3. Choose Browse and enter a name for the export files (.zip, .bpel, .wsdl).
4. Set the Export Partner Links indicator and then choose Continue.
For all send and receive steps, the assistant displays a line that displays the abstract message interface, as well as the generated defaults for the Partner Link, Partner Link Type and Role fields.
5. If the abstract message interface used in a step could not be recognized automatically, select it from the input help instead.
6. Ensure that you enter a meaningful name for the Partner Link Type at least. You can of course also enter meaningful names for Partner Link and Role.
7. Choose Finish.
To ascertain whether the export was successful or whether errors occurred, check the resulting messages.
...
1. Create either the new integration process or open the existing one that you want to import into.

If you import into an existing integration process it will be overwritten.
2.
In the
process editor, choose
with the quick info Switch Editor ® BPEL4WS Display.
The editing area displays the integration process definition as a BPEL4WS representation.
3.
Choose
with the quick info Import
BPEL4WS.
An assistant is displayed.
4. Choose Browse and specify the .zip file that contains the import files (<name>.bpel and <name>.wsdl).
The three files must have the same name. The .zip file must not contain any path specifications or directories.
5. Choose Continue.
The assistant displays all container elements that reference a message.
6. Assign the relevant abstract message interfaces.
7. Choose Continue.
The assistant displays all container elements that are used in correlations and that reference messages.
8. Assign the relevant abstract interfaces.
9. Choose Finish.
To ascertain whether the import was successful or whether errors occurred, check the resulting messages.