8 Integration With BPM Service Components in the Oracle SOA Suite

Oracle Application Adapter for SAP R/3 integrates seamlessly with Business Process Management (BPM) to facilitate Web service integration. Oracle BPM is based on the Service-Oriented Architecture (SOA). It consumes adapter services exposed as Web Service Definition Language (WSDL) documents.

This chapter contains the following topics:

Overview

To integrate with Oracle BPM, Oracle Application Adapter for SAP R/3 must be deployed in the same WLS container as Oracle BPM. The underlying adapter services must be exposed as WSDL files, which are generated during design time in Oracle Adapter Application Explorer (Application Explorer) for both request-response (outbound) and event notification (inbound) services of the adapter. For more information, see "Generating WSDL (J2CA Configurations Only)".

The generated WSDL files are used to design the appropriate BPM processes for inbound or outbound adapter services. A completed BPM process must be successfully compiled in JDeveloper and deployed to a BPM server. Upon deployment to the BPM server, every newly built process is automatically deployed to the Oracle Enterprise Manager console, where you run, monitor, and administer BPM processes, and listen to adapter events.

Deployment of Adapter

During installation, Oracle Application Adapter for SAP R/3 is deployed as a J2CA 1.0 resource adapter within the WLS container. The adapter must be deployed in the same WLS container as Oracle BPM.

Configuring a New Application Server Connection

For more information on how to configure a new Application Server connection in Oracle JDeveloper, see Configuring a New Application Server Connection.

Designing an Outbound BPM Process Using Transformations for Service Integration

The following tools are required to complete your outbound design-time configuration:

  • Oracle Adapter Application Explorer (Application Explorer)

  • Oracle JDeveloper BPM Designer (JDeveloper) or Eclipse

Note:

The examples in this chapter demonstrate the use of JDeveloper.

Before you design a BPM process, you must generate the respective WSDL file using Application Explorer. For more information, see "Generating WSDL for Request/Response Service".

Creating an Empty Composite for BPM

Perform the following steps to create an empty composite for BPM:

  1. Create a new BPM application.

  2. Enter a name for the new BPM application and click Next, as shown in Figure 8-1.

    Figure 8-1 Name Your Application Page

    Name your application page
    Description of "Figure 8-1 Name Your Application Page"

    The Name your project page is displayed, as shown in Figure 8-2.

    Figure 8-2 Name Your Project Page

    Name your project page
    Description of "Figure 8-2 Name Your Project Page"

  3. Enter a project name (for example, Mysap_jca_outbound) and click Next.

    The Configure SOA settings page is displayed, as shown in Figure 8-3.

    Figure 8-3 Configure SOA Settings Page

    Configure SOA settings page
    Description of "Figure 8-3 Configure SOA Settings Page"

  4. From the Composite Template list, select Empty Composite and click Finish.

Defining a BPM Outbound Process

This section describes how to define a BPM outbound process, which consists of the following stages:

  1. Configuring a Third Party Adapter Service Component

  2. Configuring an Outbound BPM Process Component

  3. Creating a File Adapter for the Write Operation

Configuring a Third Party Adapter Service Component

Perform the following steps to create a third party adapter service component:

  1. Drag and drop the Third Party Adapter component from the Service Adapters pane to the External References pane, as shown in Figure 8-4.

    Figure 8-4 Third Party Adapter Component

    External References pane
    Description of "Figure 8-4 Third Party Adapter Component"

    The Create Third Party Adapter Service dialog is displayed, as shown in Figure 8-5.

    Figure 8-5 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 8-5 Create Third Party Adapter Service Dialog"

  2. Enter a name for the third party adapter service.

  3. Ensure that Reference is selected from the Type list (default).

  4. Click the Find existing WSDLs icon, which is located to the right of the WSDL URL field.

    The SOA Resource Browser dialog is displayed, as shown in Figure 8-6.

    Figure 8-6 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 8-6 SOA Resource Browser Dialog"

  5. Browse and select an outbound WSDL file from the following directory:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\wsdls
    
  6. Click OK.

    The Localize Files dialog is displayed, as shown in Figure 8-7.

    Figure 8-7 Localize Files Dialog

    Localize Files dialog box
    Description of "Figure 8-7 Localize Files Dialog"

  7. Click OK.

    The outbound WSDL file and associated request and response XML schema files (.xsd) are imported to the project folder that has been created.

    You are returned to the Create Third Party Adapter Service dialog, as shown in Figure 8-8.

    Figure 8-8 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 8-8 Create Third Party Adapter Service Dialog"

  8. Click the Find JCA file icon, which is located to the right of the JCA File field.

    The SOA Resource Browser dialog is displayed, as shown in Figure 8-9.

    Figure 8-9 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 8-9 SOA Resource Browser Dialog"

  9. Browse and select the JCA properties file from the following directory:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\wsdls
    
  10. Click OK.

    The Copy File message is displayed, as shown in Figure 8-10.

    Figure 8-10 Copy File Confirmation Message

    Copy File message
    Description of "Figure 8-10 Copy File Confirmation Message"

  11. Click Yes.

    A copy of the JCA properties file is made in the project folder.

    You are returned to the Create Third Party Adapter Service dialog, as shown in Figure 8-11.

    Figure 8-11 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 8-11 Create Third Party Adapter Service Dialog"

  12. Click OK.

    The third party adapter service component (CC_GD) is created and displayed in the External References pane, as shown in Figure 8-12.

    Figure 8-12 Third Party Adapter Service Component

    External References pane
    Description of "Figure 8-12 Third Party Adapter Service Component"

    You are now ready to configure an outbound BPM process component.

Configuring an Outbound BPM Process Component

Perform the following steps to configure an outbound BPM process component:

  1. Drag and drop the BPMN Process component from the Service Components pane to the Components pane, as shown in Figure 8-13.

    Figure 8-13 BPMN Process Component

    Components pane
    Description of "Figure 8-13 BPMN Process Component"

    The Create BPMN Process dialog is displayed, as shown in Figure 8-14.

    Figure 8-14 Create BPMN Process Dialog

    Create BPMN Process dialog
    Description of "Figure 8-14 Create BPMN Process Dialog"

  2. Accept the default option that is selected in the left pane (Default Process) and click Finish.

    The BPMN Process component is created, as shown in Figure 8-15.

    Figure 8-15 BPMN Process Component

    BPMN Process component
    Description of "Figure 8-15 BPMN Process Component"

  3. Double-click the BPMN Process component in the Components pane.

    The BPMN process is displayed, as shown in Figure 8-16.

  4. Click the Activity icon, as shown in Figure 8-17.

    Figure 8-17 Activity Icon

    BPMN Process component
    Description of "Figure 8-17 Activity Icon"

  5. Drop the Activity icon on the wire between the Start and End event components, as shown in Figure 8-18.

    Figure 8-18 Activity Icon

    Start and End event components
    Description of "Figure 8-18 Activity Icon"

    The Properties - Activity dialog is displayed, as shown in Figure 8-19.

    Figure 8-19 Properties - Activity Dialog

    Properties - Activity dialog
    Description of "Figure 8-19 Properties - Activity Dialog"

  6. Click the Implementation tab, as shown in Figure 8-20.

    Figure 8-20 Implementation Tab

    Implementation tab
    Description of "Figure 8-20 Implementation Tab"

  7. Select Service Task from the Implementation Type list, as shown in Figure 8-21.

    Figure 8-21 Properties - Activity Dialog

    Implementation Type list
    Description of "Figure 8-21 Properties - Activity Dialog"

  8. Select Service Call from the Implementation list.

  9. Click the Browse icon to the right of the Name field, as shown in Figure 8-22.

    The Type dialog is displayed, as shown in Figure 8-23.

  10. Select the Third Party Service that has been created and click OK.

    You are returned to the Properties - Activity dialog, as shown in Figure 8-24.

    Figure 8-24 Properties - Activity Dialog

    Properties - Activity dialog
    Description of "Figure 8-24 Properties - Activity Dialog"

  11. Select the Use Associations option that is located under Data Associations.

  12. Click the Edit Data Associations icon.

    The Data Associations dialog is displayed, as shown in Figure 8-25.

    Figure 8-25 Data Associations Dialog

    Data Associations dialog
    Description of "Figure 8-25 Data Associations Dialog"

  13. Right-click the Process node in the right pane and select Add.

    The Create Data Object dialog is displayed, as shown in Figure 8-26.

    Figure 8-26 Create Data Object Dialog

    Create Data Object dialog
    Description of "Figure 8-26 Create Data Object Dialog"

  14. Enter a name in the Name field (for example, Request) and click Browse more types to the right of the Type field.

    The Browse Types dialog is displayed, as shown in Figure 8-27.

    Figure 8-27 Browse Types Dialog

    Browse Types dialog
    Description of "Figure 8-27 Browse Types Dialog"

  15. Select <Component> from the Type list, as shown in Figure 8-28.

    Figure 8-28 <Component> Type

    Browse Types dialog
    Description of "Figure 8-28 <Component> Type"

  16. Select the first component (for example, CompanyCodeGetDetail) and click OK.

    You are returned to the Create Data Object dialog, as shown in Figure 8-29.

    Figure 8-29 Create Data Object Dialog

    Create Data Object dialog
    Description of "Figure 8-29 Create Data Object Dialog"

  17. Click OK.

    The Data Object (for example, Request) that has been created is displayed under the Process node in the Data Associations dialog, as shown in Figure 8-30.

    Figure 8-30 Data Associations Dialog

    Data Associations dialog
    Description of "Figure 8-30 Data Associations Dialog"

  18. Create another Data Object by right-clicking the Process node in the right pane and selecting Add, as shown in Figure 8-31.

    Figure 8-31 Data Associations Dialog

    Data Associations dialog
    Description of "Figure 8-31 Data Associations Dialog"

    The Create Data Object dialog is displayed, as shown in Figure 8-32.

    Figure 8-32 Create Data Object Dialog

    Create Data Object dialog
    Description of "Figure 8-32 Create Data Object Dialog"

  19. Enter a name in the Name field (for example, Response) and click Browse more types to the right of the Type field.

    The Browse Types dialog is displayed, as shown in Figure 8-33.

    Figure 8-33 Browse Types Dialog

    Browse Types dialog
    Description of "Figure 8-33 Browse Types Dialog"

  20. Select <Component> from the Type list, as shown in Figure 8-34.

    Figure 8-34 <Component> Type

    Browse Types dialog
    Description of "Figure 8-34 <Component> Type"

  21. Select the second component (for example, CompanyCodeGetDetailResponse) and click OK.

    You are returned to the Create Data Object dialog, as shown in Figure 8-35.

    Figure 8-35 Create Data Object Dialog

    Create Data Object dialog
    Description of "Figure 8-35 Create Data Object Dialog"

  22. Click OK.

    The Data Object (for example, Response) that has been created is displayed under the Process node in the Data Associations dialog, as shown in Figure 8-36.

    Figure 8-36 Data Associations Dialog

    Data Associations dialog
    Description of "Figure 8-36 Data Associations Dialog"

  23. Select the Request Data Object under the Process node in the right pane and drag it to the field below the Inputs area, as shown in Figure 8-37.

    Figure 8-37 Request Data Object

    Data Associations dialog
    Description of "Figure 8-37 Request Data Object"

  24. Select the Response Data Object under the Process node in the right pane and drag it to the field below the Outputs area, as shown in Figure 8-38.

    Figure 8-38 Response Data Object

    Data Associations dialog
    Description of "Figure 8-38 Response Data Object"

  25. Click OK.

    You are returned to the Properties - Activity dialog, as shown in Figure 8-39.

    Figure 8-39 Properties - Activity Dialog

    Properties - Activity dialog
    Description of "Figure 8-39 Properties - Activity Dialog"

  26. Click OK.

    The Service Task is created between the Start and End Event components, as shown in Figure 8-40.

  27. Save the process and double-click the Start event component.

    The Properties - Start dialog is displayed, as shown in Figure 8-41.

    Figure 8-41 Properties - Start Dialog

    Properties - Start dialog
    Description of "Figure 8-41 Properties - Start Dialog"

  28. Click the Implementation tab, as shown in Figure 8-42.

    Figure 8-42 Implementation Tab

    Implementation tab
    Description of "Figure 8-42 Implementation Tab"

  29. Click the Plus icon to the right of the Arguments Definition field.

    The Create Argument dialog is displayed, as shown in Figure 8-43.

    Figure 8-43 Create Argument Dialog

    Create Argument dialog
    Description of "Figure 8-43 Create Argument Dialog"

  30. Enter a name in the Name field (for example, argument1) and click Browse more types to the right of the Type field.

    The Browse Types dialog is displayed, as shown in Figure 8-44.

    Figure 8-44 Browse Types Dialog

    Browse Types dialog
    Description of "Figure 8-44 Browse Types Dialog"

  31. Select <Component> from the Type list, as shown in Figure 8-45.

    Figure 8-45 <Component> Type

    Browse Types dialog
    Description of "Figure 8-45 <Component> Type"

  32. Select the first component (for example, CompanyCodeGetDetail) and click OK.

    You are returned to the Create Argument dialog, as shown in Figure 8-46.

    Figure 8-46 Create Argument Dialog

    Create Argument dialog
    Description of "Figure 8-46 Create Argument Dialog"

  33. Click OK.

    You are returned to the Properties - Start dialog, as shown in Figure 8-47.

    Figure 8-47 Properties - Start Dialog

    Description of Figure 8-47 follows
    Description of "Figure 8-47 Properties - Start Dialog"

  34. Select the Use Associations option that is located under Data Associations.

  35. Click the Edit Data Associations icon.

    The Data Associations dialog is displayed, as shown in Figure 8-48.

  36. Select the Request Data Object under the Process node in the right pane and drag it to the field below the Outputs area.

    Figure 8-48 Data Associations Dialog

    Data Associations dialog
    Description of "Figure 8-48 Data Associations Dialog"

  37. Click OK.

    You are returned to the Properties - Activity dialog, as shown in Figure 8-49.

    Figure 8-49 Properties - Activity Dialog

    Properties - Activity dialog
    Description of "Figure 8-49 Properties - Activity Dialog"

  38. Click OK.

    You are returned to the Process workspace area, as shown in Figure 8-50.

  39. Double-click composite.xml in the left pane.

    Figure 8-50 Process Workspace Area

    Process workspace area
    Description of "Figure 8-50 Process Workspace Area"

  40. Click the Save All icon in the menu bar to save the new outbound BPM process component that was configured.

    You are now ready to create a File adapter for the write operation.

Creating a File Adapter for the Write Operation

Perform the following steps to create a File adapter for the write operation:

  1. Drag and drop the File Adapter component from the Service Adapters pane to the External References pane, as shown in Figure 8-51.

    Figure 8-51 File Adapter Component

    File Adapter component
    Description of "Figure 8-51 File Adapter Component"

    The Adapter Configuration Wizard is displayed, as shown in Figure 8-52.

    Figure 8-52 Adapter Configuration Wizard

    Adapter Configuration Wizard
    Description of "Figure 8-52 Adapter Configuration Wizard"

  2. Click Next.

    The Service Name page is displayed, as shown in Figure 8-53.

    Figure 8-53 Service Name Page

    Service Name page
    Description of "Figure 8-53 Service Name Page"

  3. Type a name for the new File adapter in the Service Name field and click Next.

    The Adapter Interface page is displayed, as shown in Figure 8-54.

    Figure 8-54 Adapter Interface Page

    Adapter Interface pane
    Description of "Figure 8-54 Adapter Interface Page"

  4. Ensure that the Define from operation and schema (specified later) option is selected.

  5. Click Next.

    The Operation page is displayed, as shown in Figure 8-55.

    Figure 8-55 Operation Page

    Operation pane
    Description of "Figure 8-55 Operation Page"

  6. Select Write File from the list of Operation Type options and specify an Operation Name (for example, Write).

  7. Click Next.

    The File Configuration page is displayed, as shown in Figure 8-56.

    Figure 8-56 File Configuration Page

    File Configuration pane
    Description of "Figure 8-56 File Configuration Page"

  8. Specify a location on your file system where the output file is written.

  9. In the File Naming Convention field, specify a name for the output file.

  10. Click Next.

    The Messages page is displayed, as shown in Figure 8-57.

    Figure 8-57 Messages Page

    Messages pane
    Description of "Figure 8-57 Messages Page"

  11. Click Browse, which is located to the right of the URL field.

    The Type Chooser dialog is displayed, as shown in Figure 8-58.

    Figure 8-58 Type Chooser Dialog

    Type Chooser dialog box
    Description of "Figure 8-58 Type Chooser Dialog"

  12. Expand Project Schema Files and mysap_bpm_GetDetail_invoke_response.xsd.

  13. Select the available schema (for example, CompanyCode.GetDetail.Response).

  14. Click OK.

    You are returned to the Messages page, as shown in Figure 8-59.

    Figure 8-59 Messages Page

    Messages pane
    Description of "Figure 8-59 Messages Page"

  15. Click Next.

    The Finish page is displayed, as shown in Figure 8-60.

  16. Click Finish.

    The File Adapter service is created in the External References pane, as shown in Figure 8-61.

    Figure 8-61 File Adapter Service

    External References pane
    Description of "Figure 8-61 File Adapter Service"

  17. Double-click the BPMN Process component.

    The BPMN process is displayed, as shown in Figure 8-62.

  18. Click the Activity icon.

  19. Drop the Activity icon on the wire between the Service Task and End event components, as shown in Figure 8-63.

    Figure 8-63 Activity Icon

    Service Task and End components
    Description of "Figure 8-63 Activity Icon"

    The Properties - Activity dialog is displayed, as shown in Figure 8-64.

    Figure 8-64 Properties - Activity Dialog

    Properties - Activity dialog
    Description of "Figure 8-64 Properties - Activity Dialog"

  20. Click the Implementation tab, as shown in Figure 8-65.

    Figure 8-65 Implementation Tab

    Implementation tab
    Description of "Figure 8-65 Implementation Tab"

  21. Select Service Task from the Implementation Type list, as shown in Figure 8-66.

  22. Select Service Call from the Implementation list.

  23. Click the Browse icon to the right of the Name field, as shown in Figure 8-67.

    The Type dialog is displayed, as shown in Figure 8-68.

  24. Select the service for write operation that has been created (for example, Write_file) and click OK.

    You are returned to the Properties - ServiceTask1 dialog, as shown in Figure 8-69.

    Figure 8-69 Properties - ServiceTask1 Dialog

    Properties - ServiceTask1 dialog
    Description of "Figure 8-69 Properties - ServiceTask1 Dialog"

  25. Select the Use Transformations option that is located under Data Associations.

  26. Click the Edit XSL Transformations icon.

    The Transformations dialog is displayed, as shown in Figure 8-70.

    Figure 8-70 Transformations Dialog

    Transformations dialog
    Description of "Figure 8-70 Transformations Dialog"

  27. Click the Plus icon.

    The Transformation dialog is displayed, as shown in Figure 8-71.

    Figure 8-71 Transformation Dialog

    Transformation dialog
    Description of "Figure 8-71 Transformation Dialog"

  28. Select the Response Data Object that was created from the Sources list.

  29. Click the Plus icon so that the Data Object 'Response' is added to the Selected Elements area, as shown in Figure 8-72.

  30. Accept the default value that is selected in the Target list, as shown in Figure 8-73.

    Figure 8-73 Target List Default Value

    Transformation dialog
    Description of "Figure 8-73 Target List Default Value"

  31. Enter a name (for example, transformation) in the Create field and click OK.

    You are returned to the Transformations dialog, as shown in Figure 8-74.

    Figure 8-74 Transformations Dialog

    Transformations dialog
    Description of "Figure 8-74 Transformations Dialog"

  32. Click OK.

    You are returned to the Properties - ServiceTask1 dialog, as shown in Figure 8-75.

    Figure 8-75 Properties - ServiceTask1 Dialog

    Properties - ServiceTask1 dialog
    Description of "Figure 8-75 Properties - ServiceTask1 Dialog"

  33. Click OK.

    The transformation.xsl tab is displayed, as shown in Figure 8-76.

    Figure 8-76 Transformation.xsl Tab

    transformation.xsl tab
    Description of "Figure 8-76 Transformation.xsl Tab"

  34. Automap the Source and Target elements.

    The Auto Map Preferences dialog is displayed, as shown in Figure 8-77.

    Figure 8-77 Auto Map Preferences Dialog

    Auto Map Preferences dialog
    Description of "Figure 8-77 Auto Map Preferences Dialog"

  35. Accept the default values and click OK.

    The transformation is completed, as shown in Figure 8-78.

    Figure 8-78 Completed Transformation

    completed transformation
    Description of "Figure 8-78 Completed Transformation"

  36. Save the transformation.

  37. Return to the Process workspace area, as shown in Figure 8-79.

    Figure 8-79 Process Workspace Area

    Process workspace area
    Description of "Figure 8-79 Process Workspace Area"

    The ServiceTask1 component is created between the ServiceTask component and the End event component.

  38. Save the process.

  39. Double-click the End event component.

    The Properties - End dialog is displayed.

  40. Click the Implementation tab, as shown in Figure 8-80.

    Figure 8-80 Implementation Tab

    Implementation tab
    Description of "Figure 8-80 Implementation Tab"

  41. Select None from the Implementation Type list, as shown in Figure 8-81.

    Figure 8-81 Implementation Type List

    Implementation Type list
    Description of "Figure 8-81 Implementation Type List"

  42. Click OK.

    You are returned to the Process workspace area, as shown in Figure 8-82.

    Figure 8-82 Process Workspace Area

    Process workspace area
    Description of "Figure 8-82 Process Workspace Area"

  43. Save the Process and double-click the composite.xml file.

  44. Click the Save All icon in the menu bar to save the new outbound BPM process component that was configured.

    You are now ready to deploy the outbound BPM process.

Deploying the BPM Outbound Process

Perform the following steps to deploy the BPM outbound process.

  1. Right-click the project name in the left pane (for example, Mysap_jca_outbound), select Deploy, and then click Mysap_jca_outbound, as shown in Figure 8-83.

    Figure 8-83 Mysap_jca_outbound Option

    Deploy context menu
    Description of "Figure 8-83 Mysap_jca_outbound Option"

    The Deployment Action page is displayed, as shown in Figure 8-84.

    Figure 8-84 Deployment Action Page

    Deployment Action pane
    Description of "Figure 8-84 Deployment Action Page"

  2. Ensure that Deploy to Application Server is selected.

  3. Click Next.

    The Deploy Configuration page is displayed, as shown in Figure 8-85.

    Figure 8-85 Deploy Configuration Page

    Deploy Configuration pane
    Description of "Figure 8-85 Deploy Configuration Page"

  4. Leave the default values selected and click Next.

    The Select Server page is displayed, as shown in Figure 8-86.

    Figure 8-86 Select Server Page

    Select Server pane
    Description of "Figure 8-86 Select Server Page"

  5. Select an available application server that was configured and click Next.

    The SOA Servers page is displayed, as shown in Figure 8-87.

    Figure 8-87 SOA Servers Page

    SOA Servers pane
    Description of "Figure 8-87 SOA Servers Page"

  6. Select a target SOA server and click Next.

    The Summary page is displayed, as shown in Figure 8-88.

  7. Review and verify all the available deployment information for your project and click Finish.

    The process is deployed successfully, as shown in Figure 8-89.

    Figure 8-89 Successful Deployment Message

    deployed process
    Description of "Figure 8-89 Successful Deployment Message"

Invoking the Input XML Document in the Oracle Enterprise Manager Console

Perform the following steps to invoke the input XML document in the Oracle Enterprise Manager console.

  1. Logon to the Oracle Enterprise Manager console, as shown in Figure 8-90.

    Figure 8-90 Oracle Enterprise Manager Console

    Oracle Enterprise Manager console
    Description of "Figure 8-90 Oracle Enterprise Manager Console"

  2. Expand your domain in the left pane followed by the SOA folder.

  3. Select an available project (for example, Mysap_jca_outbound).

  4. Click Test, as shown in Figure 8-91.

  5. Click the Request tab.

  6. Provide an appropriate input value in the Value field and click Test Web Service, as shown in Figure 8-92.

    A response is received in the Response tab to indicate that invocation was successful in the Oracle Enterprise Manager console, as shown in Figure 8-93.

    Figure 8-93 Received Response

    Response tab
    Description of "Figure 8-93 Received Response"

  7. Navigate to the defined output directory on your file system and open the XML response document that was received, as shown in Figure 8-94.

    Figure 8-94 XML Response Document

    XML response document
    Description of "Figure 8-94 XML Response Document"

    The XML response document contains the generated output with values. For example:

    <?xml version="1.0" encoding="UTF-8" ?><bapi:CompanyCode.GetDetail.Response xmlns:bapi="urn:sap-com:document:sap:business.response" xmlns="urn:sap-com:document:sap:business.response">   <bapi:COMPANYCODE_ADDRESS>      <bapi:ADDR_NO>0000000121</bapi:ADDR_NO>      <bapi:FORMOFADDR>Firma</bapi:FORMOFADDR>      <bapi:NAME>Ides AG</bapi:NAME>      <bapi:NAME_2/>      <bapi:NAME_3/>      <bapi:NAME_4/>      <bapi:C_O_NAME/>      <bapi:CITY>Frankfurt</bapi:CITY>      <bapi:DISTRICT/>      <bapi:CITY_NO/>      <bapi:POSTL_COD1>60441</bapi:POSTL_COD1>      <bapi:POSTL_COD2>60070</bapi:POSTL_COD2>      <bapi:POSTL_COD3/>      <bapi:PO_BOX>160529</bapi:PO_BOX>      <bapi:PO_BOX_CIT/>      <bapi:DELIV_DIS/>      <bapi:STREET>Lyoner Stern 231</bapi:STREET>      <bapi:STREET_NO/>      <bapi:STR_ABBR/>      <bapi:HOUSE_NO/>      <bapi:STR_SUPPL1/>      <bapi:STR_SUPPL2/>      <bapi:LOCATION/>      <bapi:BUILDING/>      <bapi:FLOOR/>      <bapi:ROOM_NO/>      <bapi:COUNTRY>DE</bapi:COUNTRY>      <bapi:LANGU>D</bapi:LANGU>      <bapi:REGION>06</bapi:REGION>      <bapi:SORT1>IDES</bapi:SORT1>      <bapi:SORT2/>      <bapi:TIME_ZONE>CET</bapi:TIME_ZONE>      <bapi:TAXJURCODE/>      <bapi:ADR_NOTES/>      <bapi:COMM_TYPE/>      <bapi:TEL1_NUMBR/>      <bapi:TEL1_EXT/>      <bapi:FAX_NUMBER/>      <bapi:FAX_EXTENS/>   </bapi:COMPANYCODE_ADDRESS>   <bapi:COMPANYCODE_DETAIL>      <bapi:COMP_CODE>1000</bapi:COMP_CODE>      <bapi:COMP_NAME>IDES AG</bapi:COMP_NAME>      <bapi:CITY>Frankfurt</bapi:CITY>      <bapi:COUNTRY>DE</bapi:COUNTRY>      <bapi:CURRENCY>EUR</bapi:CURRENCY>      <bapi:LANGU>D</bapi:LANGU>      <bapi:CHRT_ACCTS>INT</bapi:CHRT_ACCTS>      <bapi:FY_VARIANT>K4</bapi:FY_VARIANT>      <bapi:VAT_REG_NO>DE123456789</bapi:VAT_REG_NO>      <bapi:COMPANY>001000</bapi:COMPANY>      <bapi:ADDR_NO>0000000121</bapi:ADDR_NO>      <bapi:COUNTRY_ISO>DE</bapi:COUNTRY_ISO>      <bapi:CURRENCY_ISO>EUR</bapi:CURRENCY_ISO>      <bapi:LANGU_ISO>DE</bapi:LANGU_ISO>   </bapi:COMPANYCODE_DETAIL>   <bapi:RETURN>      <bapi:TYPE/>      <bapi:CODE/>      <bapi:MESSAGE/>      <bapi:LOG_NO/>      <bapi:LOG_MSG_NO>000000</bapi:LOG_MSG_NO>      <bapi:MESSAGE_V1/>      <bapi:MESSAGE_V2/>      <bapi:MESSAGE_V3/>      <bapi:MESSAGE_V4/>   </bapi:RETURN></bapi:CompanyCode.GetDetail.Response>
    

Workaround for J2CA BPM Processing When Using BAPI or RFC Objects

When a J2CA BPM outbound process for the BusinessArea GetDetail object is created and deployed, the following error is generated in Oracle JDeveloper:

Error: Data Association expression is not valid in node 'ServiceTask':  Undefined variable 'businessAreaGetDetail'. Error: Data Association expression is not valid in node 'ServiceTask':  Undefined variable 'businessAreaGetDetailResponse'. Error: The transformation in node ServiceTask1 has an invalid target reference: businessAreaGetDetailResponse

This section provides instructions on how to apply a workaround that resolves this issue.

Note:

This workaround is applicable to Oracle BUG 10078610 - typeloadruntimeexception: bpm-71530 using xsd with attribute group.
  1. Close and then reopen Oracle JDeveloper.

  2. Open the composite.xml file from the project folder and double-click the Process component, as shown in Figure 8-95.

    Figure 8-95 Process Component

    Oracle JDeveloper
    Description of "Figure 8-95 Process Component"

    The Process tab is displayed.

  3. Double-click the ServiceTask activity, as shown in Figure 8-96.

    Figure 8-96 ServiceTask Activity

    ServiceTask Activity
    Description of "Figure 8-96 ServiceTask Activity"

    The Properties - ServiceTask dialog is displayed, as shown in Figure 8-97.

    Figure 8-97 Properties - ServiceTask Dialog

    ServiceTask dialog
    Description of "Figure 8-97 Properties - ServiceTask Dialog"

  4. Click the Implementation tab.

  5. Uncheck the Use Associations option.

    A confirmation message is displayed in the Data Associations dialog, as shown in Figure 8-98.

    Figure 8-98 Confirmation Message

    Data Associations dialog
    Description of "Figure 8-98 Confirmation Message"

  6. Click Yes.

    You are returned to the Properties - ServiceTask dialog, as shown in Figure 8-99.

    Figure 8-99 Properties - ServiceTask Dialog

    ServiceTask dialog
    Description of "Figure 8-99 Properties - ServiceTask Dialog"

  7. Select the Use Associations option and then click the Edit Data Associations icon.

    The Data Associations window is displayed, as shown in Figure 8-100.

    Figure 8-100 Data Associations Window

    Data Associations window
    Description of "Figure 8-100 Data Associations Window"

  8. Drag and drop dataobject1 (request) to the Inputs field and dataobject2 (response) to the Outputs field, as shown in Figure 8-101.

    Figure 8-101 Dataobject1 and Dataobject 2

    Data Associations window
    Description of "Figure 8-101 Dataobject1 and Dataobject 2"

  9. Click OK.

    You are returned to the Properties - ServiceTask dialog, as shown in Figure 8-102.

    Figure 8-102 Properties - ServiceTask Dialog

    ServiceTask dialog
    Description of "Figure 8-102 Properties - ServiceTask Dialog"

  10. Click OK.

    You are returned to the Process tab, as shown in Figure 8-103.

  11. Double-click the ServiceTask1 activity.

    The Properties - ServiceTask1 dialog is displayed, as shown in Figure 8-104.

    Figure 8-104 Properties - ServiceTask1 Dialog

    ServiceTask1 dialog
    Description of "Figure 8-104 Properties - ServiceTask1 Dialog"

  12. Click the Implementation tab.

  13. Uncheck the Use Associations option.

    A confirmation message is displayed in the Data Associations dialog, as shown in Figure 8-105.

    Figure 8-105 Confirmation Message

    Data Associations dialog
    Description of "Figure 8-105 Confirmation Message"

  14. Click Yes.

    You are returned to the Properties - ServiceTask1 dialog, as shown in Figure 8-106.

    Figure 8-106 Properties - ServiceTask1 Dialog

    ServiceTask1 dialog
    Description of "Figure 8-106 Properties - ServiceTask1 Dialog"

  15. Select the Use Associations option and then click the Edit Data Associations icon.

    The Data Associations window is displayed, as shown in Figure 8-107.

    Figure 8-107 Data Associations Window

    Data Associations window
    Description of "Figure 8-107 Data Associations Window"

  16. Drag and drop dataobject2 (response) to the Inputs field, as shown in Figure 8-108.

  17. Click OK.

    You are returned to the Properties - ServiceTask1 dialog, as shown in Figure 8-109.

    Figure 8-109 Properties - ServiceTask1 Dialog

    ServiceTask1 dialog
    Description of "Figure 8-109 Properties - ServiceTask1 Dialog"

  18. Click OK.

    You are returned to the Process tab, as shown in Figure 8-110.

    Notice that no errors or warnings are being indicated.

  19. Save the process and then deploy the process.

Designing an Inbound BPM Process Using Transformations for Event Integration

This section demonstrates how Oracle Application Adapter for SAP R/3 integrates with SAP R/3 to receive event data.

The following tools are required to complete your adapter design-time configuration:

  • Oracle Adapter Application Explorer (Application Explorer)

  • Oracle JDeveloper BPM Designer (JDeveloper) or Eclipse

Note:

The examples in this chapter demonstrate the use of JDeveloper.

Before you design a BPM process, you must generate the respective WSDL file using Application Explorer. For more information, see "Generating WSDL for Event Integration".

Creating an Empty Composite for BPM

Perform the following steps to create an empty composite for BPM:

  1. Create a new BPM application.

  2. Enter a name for the new BPM application and click Next, as shown in Figure 8-111.

    Figure 8-111 Name Your Application Page

    Name your application page
    Description of "Figure 8-111 Name Your Application Page"

    The Name your project page is displayed, as shown in Figure 8-112.

    Figure 8-112 Name Your Project Page

    Name your project page
    Description of "Figure 8-112 Name Your Project Page"

  3. Enter a project name (for example, Mysap_matmas_inbound) and click Next.

    The Configure SOA settings page is displayed, as shown in Figure 8-113.

    Figure 8-113 Configure SOA Settings Page

    Configure SOA settings page
    Description of "Figure 8-113 Configure SOA Settings Page"

  4. From the Composite Template list, select Empty Composite and click Finish.

Defining a BPM Inbound Process

This section describes how to define a BPM inbound process, which consists of the following stages:

  1. Configuring a Third Party Adapter Service Component

  2. Configuring an Inbound BPM Process Component

  3. Creating a File Adapter for the Write Operation

Configuring a Third Party Adapter Service Component

Perform the following steps to create a third party adapter service component:

  1. Drag and drop the Third Party Adapter component from the Service Adapters pane to the Exposed References pane, as shown in Figure 8-114.

    Figure 8-114 Third Party Adapter Component

    Exposed References pane
    Description of "Figure 8-114 Third Party Adapter Component"

    The Create Third Party Adapter Service dialog is displayed, as shown in Figure 8-115.

    Figure 8-115 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 8-115 Create Third Party Adapter Service Dialog"

  2. Enter a name for the third party adapter service.

  3. Ensure that Service is selected from the Type list (default).

  4. Click the Find existing WSDLs icon, which is located to the right of the WSDL URL field.

    The SOA Resource Browser dialog is displayed, as shown in Figure 8-116.

    Figure 8-116 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 8-116 SOA Resource Browser Dialog"

  5. Browse and select an inbound WSDL file from the following directory:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\wsdls
    
  6. Click OK.

    The Localize Files dialog is displayed, as shown in Figure 8-117.

    Figure 8-117 Localize Files Dialog

    Localize Files dialog box
    Description of "Figure 8-117 Localize Files Dialog"

  7. Click OK.

    The inbound WSDL file and associated receive_request XML schema file (.xsd) are imported to the project folder that has been created.

    You are returned to the Create Third Party Adapter Service dialog, as shown in Figure 8-118.

    Figure 8-118 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 8-118 Create Third Party Adapter Service Dialog"

  8. Click the Find JCA file icon, which is located to the right of the JCA File field.

    The SOA Resource Browser dialog is displayed, as shown in Figure 8-119.

    Figure 8-119 SOA Resource Browser Dialog

    SOA Resource Browser dialog box
    Description of "Figure 8-119 SOA Resource Browser Dialog"

  9. Browse and select the JCA properties file from the following directory:

    <ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\wsdls
    
  10. Click OK.

    The Copy File message is displayed, as shown in Figure 8-120.

    Figure 8-120 Copy File Confirmaton Message

    Copy File message
    Description of "Figure 8-120 Copy File Confirmaton Message"

  11. Click Yes.

    A copy of the JCA properties file is made in the project folder.

    You are returned to the Create Third Party Adapter Service dialog, as shown in Figure 8-121.

    Figure 8-121 Create Third Party Adapter Service Dialog

    Create Third Party Adapter Service dialog box
    Description of "Figure 8-121 Create Third Party Adapter Service Dialog"

  12. Click OK.

    The third party adapter service component (matmas) is created in the Exposed References pane, as shown in Figure 8-122.

    Figure 8-122 Third Party Adapter Service Component

    Exposed References pane
    Description of "Figure 8-122 Third Party Adapter Service Component"

    You are now ready to configure an inbound BPM process component.

Configuring an Inbound BPM Process Component

Perform the following steps to configure an inbound BPM process component:

  1. Drag and drop the BPMN Process component from the Service Components pane to the Components pane, as shown in Figure 8-123.

    Figure 8-123 BPMN Process Component

    Components pane
    Description of "Figure 8-123 BPMN Process Component"

    The Create BPMN Process dialog is displayed, as shown in Figure 8-124.

    Figure 8-124 Create BPMN Process Dialog

    Create BPMN Process dialog
    Description of "Figure 8-124 Create BPMN Process Dialog"

  2. Select the From Pattern option in the left pane and ensure that Manual Process is selected in the Patterns area.

  3. Click Finish.

    The BPMN Process component is created, as shown in Figure 8-125.

    Figure 8-125 BPMN Process Component

    BPMN Process component
    Description of "Figure 8-125 BPMN Process Component"

  4. Double-click the BPMN Process component in the Components pane.

    The BPMN process is displayed, as shown in Figure 8-126.

    Figure 8-126 BPMN Process

    BPMN Process component
    Description of "Figure 8-126 BPMN Process"

  5. Right-click UserTask and select Delete from the menu.

  6. Double-click the Start event component, as shown in Figure 8-127.

    Figure 8-127 Start Event Component

    Start event component
    Description of "Figure 8-127 Start Event Component"

    The Properties - Start dialog is displayed, as shown in Figure 8-128.

    Figure 8-128 Properties - Start Dialog

    Properties - Start dialog
    Description of "Figure 8-128 Properties - Start Dialog"

  7. Click the Implementation tab, as shown in Figure 8-129.

    Figure 8-129 Implementation Tab

    Implementation tab
    Description of "Figure 8-129 Implementation Tab"

  8. Select Message from the Implementation Type list, as shown in Figure 8-130.

    Figure 8-130 Implementation Type List

    Properties - Start dialog
    Description of "Figure 8-130 Implementation Type List"

  9. Select Interface from Catalog from the Implementation list.

  10. Click the Browse icon to the right of the Name field, as shown in Figure 8-131.

    The Type dialog is displayed, as shown in Figure 8-132.

  11. Select the Third Party Service that has been created and click OK.

    You are returned to the Properties - Start dialog, as shown in Figure 8-133.

    Figure 8-133 Properties - Start Dialog

    Properties - Start dialog
    Description of "Figure 8-133 Properties - Start Dialog"

  12. Select the Use Associations option that is located under Data Associations.

  13. Click the Edit Data Associations icon.

    The Data Associations dialog is displayed, as shown in Figure 8-134.

    Figure 8-134 Data Associations Dialog

    Data Associations dialog
    Description of "Figure 8-134 Data Associations Dialog"

  14. Right-click the Process node in the right pane and select Add.

    The Create Data Object dialog is displayed, as shown in Figure 8-135.

    Figure 8-135 Create Data Object Dialog

    Create Data Object dialog
    Description of "Figure 8-135 Create Data Object Dialog"

  15. Enter a name in the Name field (for example, matmas_inbound) and click Browse more types to the right of the Type field.

    The Browse Types dialog is displayed, as shown in Figure 8-136.

    Figure 8-136 Browse Types Dialog

    Browse Types dialog
    Description of "Figure 8-136 Browse Types Dialog"

  16. Select <Component> from the Type list, as shown in Figure 8-137.

  17. Select the first component (for example, MATMAS01) and click OK.

    You are returned to the Create Data Object dialog, as shown in Figure 8-138.

    Figure 8-138 Create Data Object Dialog

    Create Data Object dialog
    Description of "Figure 8-138 Create Data Object Dialog"

  18. Click OK.

    The Data Object (for example, matmas_inbound) that has been created is displayed under the Process node in the Data Associations dialog, as shown in Figure 8-139.

    Figure 8-139 Data Associations Dialog

    Data Associations dialog
    Description of "Figure 8-139 Data Associations Dialog"

  19. Select the matmas_inbound Data Object under the Process node in the right pane and drag it to the field below the Outputs area.

  20. Click OK.

    You are returned to the Properties - Start dialog, as shown in Figure 8-140.

    Figure 8-140 Properties - Start Dialog

    Properties - Start dialog
    Description of "Figure 8-140 Properties - Start Dialog"

  21. Click OK.

    You are returned to the Process workspace area, as shown in Figure 8-141.

  22. Double-click composite.xml in the left pane.

    Figure 8-141 Process Workspace Area

    Process workspace area
    Description of "Figure 8-141 Process Workspace Area"

  23. Click the Save All icon in the menu bar to save the new inbound BPM process component that was configured.

    You are now ready to create a File adapter for the write operation.

Creating a File Adapter for the Write Operation

Perform the following steps to create a File adapter for the write operation:

  1. Drag and drop the File Adapter component from the Service Adapters pane to the External References pane, as shown in Figure 8-142.

    Figure 8-142 File Adapter Component

    File Adapter component
    Description of "Figure 8-142 File Adapter Component"

    The Adapter Configuration Wizard is displayed, as shown in Figure 8-143.

    Figure 8-143 Adapter Configuration Wizard

    Adapter Configuration Wizard
    Description of "Figure 8-143 Adapter Configuration Wizard"

  2. Click Next.

    The Service Name page is displayed, as shown in Figure 8-144.

    Figure 8-144 Service Name Page

    Service Name page
    Description of "Figure 8-144 Service Name Page"

  3. Type a name for the new File adapter in the Service Name field and click Next.

    The Adapter Interface page is displayed, as shown in Figure 8-145.

    Figure 8-145 Adapter Interface Page

    Adapter Interface pane
    Description of "Figure 8-145 Adapter Interface Page"

  4. Ensure that the Define from operation and schema (specified later) option is selected.

  5. Click Next.

    The Operation page is displayed, as shown in Figure 8-146.

    Figure 8-146 Operation Page

    Operation pane
    Description of "Figure 8-146 Operation Page"

  6. Select Write File from the list of Operation Type options and specify an Operation Name (for example, Write).

  7. Click Next.

    The File Configuration page is displayed, as shown in Figure 8-147.

    Figure 8-147 File Configuration Page

    File Configuration pane
    Description of "Figure 8-147 File Configuration Page"

  8. Specify a location on your file system where the output file is written.

  9. In the File Naming Convention field, specify a name for the output file.

  10. Click Next.

    The Messages page is displayed, as shown in Figure 8-148.

    Figure 8-148 Messages Page

    Messages pane
    Description of "Figure 8-148 Messages Page"

  11. Click Browse, which is located to the right of the URL field.

    The Type Chooser dialog is displayed, as shown in Figure 8-149.

    Figure 8-149 Type Chooser Dialog

    Type Chooser dialog box
    Description of "Figure 8-149 Type Chooser Dialog"

  12. Expand Project Schema Files and MYSAP_MATMAS01_receive_request.xsd.

  13. Select the available schema (for example, MATMAS01).

  14. Click OK.

    You are returned to the Messages page, as shown in Figure 8-150.

    Figure 8-150 Messages Page

    Messages pane
    Description of "Figure 8-150 Messages Page"

  15. Click Next.

    The Finish page is displayed, as shown in Figure 8-151.

  16. Click Finish.

    The File Adapter service is created in the External References pane, as shown in Figure 8-152.

    Figure 8-152 File Adapter Service

    File Adapter service
    Description of "Figure 8-152 File Adapter Service"

  17. Double-click the BPMN Process component.

    The BPMN process is displayed, as shown in Figure 8-153.

    Figure 8-153 BPMN Process

    BPMN process
    Description of "Figure 8-153 BPMN Process"

  18. Click the Activity icon.

  19. Drop the Activity icon on the wire between the Start and End event components, as shown in Figure 8-154.

    Figure 8-154 Activity Icon

    Activity icon
    Description of "Figure 8-154 Activity Icon"

    The Properties - Activity dialog is displayed, as shown in Figure 8-155.

    Figure 8-155 Properties - Activity Dialog

    Properties - Activity dialog
    Description of "Figure 8-155 Properties - Activity Dialog"

  20. Click the Implementation tab, as shown in Figure 8-156.

    Figure 8-156 Implementation Tab

    Implementation tab
    Description of "Figure 8-156 Implementation Tab"

  21. Select Service Task from the Implementation Type list, as shown in Figure 8-157.

    Figure 8-157 Service Task

    Implementation Type list
    Description of "Figure 8-157 Service Task"

  22. Select Service Call from the Implementation list.

  23. Click the Browse icon to the right of the Name field, as shown in Figure 8-158.

    The Type dialog is displayed, as shown in Figure 8-159.

  24. Select the service for write operation that has been created and click OK.

    You are returned to the Properties - Activity dialog, as shown in Figure 8-160.

    Figure 8-160 Properties - Activity Dialog

    Properties - Activity dialog
    Description of "Figure 8-160 Properties - Activity Dialog"

  25. Select the Use Transformations option that is located under Data Associations.

  26. Click the Edit XSL Transformations icon.

    The Transformations dialog is displayed, as shown in Figure 8-161.

    Figure 8-161 Transformations Dialog

    Transformations dialog
    Description of "Figure 8-161 Transformations Dialog"

  27. Click the Plus icon.

    The Transformation dialog is displayed, as shown in Figure 8-162.

    Figure 8-162 Transformation Dialog

    Transformation dialog
    Description of "Figure 8-162 Transformation Dialog"

  28. Select the matmas_inbound Data Object that was created from the Sources list.

  29. Click the Plus icon so that the Data Object 'matmas_inbound' is added to the Selected Elements area.

    Figure 8-163 Target Default Value

    Transformation dialog
    Description of "Figure 8-163 Target Default Value"

  30. Accept the default value that is selected in the Target list, as shown in Figure 8-163.

    Figure 8-164 Transformation Create Field

    Transformation dialog
    Description of "Figure 8-164 Transformation Create Field"

  31. Enter a name (for example, mat) in the Create field and click OK, as shown in Figure 8-164.

    You are returned to the Transformations dialog, as shown in Figure 8-165.

    Figure 8-165 Transformations Dialog

    Transformations dialog
    Description of "Figure 8-165 Transformations Dialog"

  32. Click OK.

    You are returned to the Properties - Activity dialog, as shown in Figure 8-166.

    Figure 8-166 Properties - Activity Dialog

    Properties - Activity dialog
    Description of "Figure 8-166 Properties - Activity Dialog"

  33. Click OK.

    The mat.xsl tab is displayed, as shown in Figure 8-167.

  34. Automap the Source and Target elements.

    The Auto Map Preferences dialog is displayed, as shown in Figure 8-168.

    Figure 8-168 Auto Map Preferences Dialog

    Auto Map Preferences dialog
    Description of "Figure 8-168 Auto Map Preferences Dialog"

  35. Accept the default values and click OK.

    The transformation is completed, as shown in Figure 8-169.

    Figure 8-169 Completed Transformation

    completed transformation
    Description of "Figure 8-169 Completed Transformation"

  36. Save the transformation.

  37. Return to the Process workspace area, as shown in Figure 8-170.

    Figure 8-170 Process Workspace Area

    Process workspace area
    Description of "Figure 8-170 Process Workspace Area"

    The ServiceTask component is created between the Start event component and the End event component.

  38. Save the Process and double-click the composite.xml file.

  39. Click the Save All icon in the menu bar to save the new inbound BPM process component that was configured.

    You are now ready to deploy the inbound BPM process. You can follow the same procedure that is described in "Deploying the BPEL Inbound Process". For more information on how to trigger events in SAP R/3, see "Triggering an Event in SAP R/3".