Skip Headers
Oracle® WebLogic Communication Services Developer's Guide
11g Release 1 (11.1.1)

Part Number E13807-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

A Oracle User Messaging Service Applications

This appendix describes how to create your own Oracle User Messaging Service applications using the procedures and code provided.

This chapter includes the following sections:

A.1 Send Message to User Specified Channel

This chapter describes how to build and run the Send Message to User Specified Channel application provided with Oracle User Messaging Service.

Note:

To learn about the architecture and components of Oracle User Messaging Service, see Oracle Fusion Middleware Getting Started with Oracle SOA Suite.

This chapter contains the following sections:

A.1.1 Overview

The "Send Message to User Specified Channel" application demonstrates a BPEL process that allows a message to be sent to a user through a messaging channel specified in User Messaging Preferences. After you have configured a device and messaging channel addresses for each supported channel and the default device, Oracle User Messaging Service routes the message to the user based on the preferred channel setting that you configured.

A.1.1.1 Provided Files

The following files are included in the application:

  • SendMessage.pdf – this document.

  • Project – the directory containing Oracle JDeveloper project files.

  • Readme.txt.

  • Release notes

A.1.2 Installing and Configuring SOA and User Messaging Service

The installation of SOA and User Messaging Service has already been performed on your hosted instance, and the sample users have already been seeded. Perform the following steps to enable notifications in soa-infra, if not already done:

  1. Using Enterprise Manager, go to "soa-infra" > (Menu) > Workflow Notification Properties, and set Notification Mode to ALL.

  2. Configure the User Messaging drivers if required as described in "Configuring Drivers" in the Oracle Fusion Middleware SOA Administrator's Guide.

  3. Set the email address for user "weblogic" by using the JXplorer LDAP browser. Refer to "Updating Addresses in Your LDAP User Profile".

  4. Restart the server.

A.1.2.1 Updating Addresses in Your LDAP User Profile

Perform the following steps to set the email address for user "weblogic" by using the JXplorer LDAP browser:

A.1.2.1.1 Installing

Download and install JXplorer from http://www.jxplorer.org.

A.1.2.1.2 Connecting
  1. Set the embedded LDAP server admin password as follows:

    • Login to the WLS Admin Console.

    • Click on the domain name link > Security > Embedded LDAP.

    • Enter a new "Credential" and "Confirm Credential" (for example, "weblogic").

    • Click Save.

  2. Connect from JXplorer by specifying the fields in Table A-1:

Table A-1 JXplorer Connection Fields

Field Value

Host

WLS AdminServer hostname

Port

WLS AdminServer port

Protocol

LDAP v3

Security Level

User + Password

User DN

cn=Admin

Password

<password> (for example, weblogic)


A.1.2.1.3 Setting User Messaging Device Addresses in LDAP

The following example uses the user "weblogic". You may create and use additional users.

  1. Expand the LDAP tree as follows: domain > myrealm > people > weblogic.

  2. Click on the user entry.

  3. Select the HTML view tab on the right.

  4. Enter the desired Email Address and Mobile Phone Number.

  5. Click Submit.

A.1.3 Building the Sample

Performing the following procedure of building the sample from scratch allows you to learn how to add messaging to your SOA Composite Applications, and use User Messaging Preferences.

  1. Open Oracle JDeveloper 11g.

  2. Create a new application by selecting File, New, General, Applications, and SOA Applications. Click OK.

  3. Enter the Application Name and click Next (Figure A-1).

    Figure A-1 Creating a New Application and Project (1 of 3)

    Description of Figure A-1 follows
    Description of "Figure A-1 Creating a New Application and Project (1 of 3)"

  4. Enter the name for the project and click Next (Figure A-2).

  5. Figure A-2 Creating a New Application and Project (2 of 3)

    Description of Figure A-2 follows
    Description of "Figure A-2 Creating a New Application and Project (2 of 3)"

  6. Select the Composite With BPEL composite template (Figure A-3). Click Finish.

    Figure A-3 Creating a New Application and Project (3 of 3)

    Description of Figure A-3 follows
    Description of "Figure A-3 Creating a New Application and Project (3 of 3)"

  7. In the Create BPEL Process window, enter the BPEL process name as "SendMessage" (Figure A-4). Click OK.

    Figure A-4 Creating the BPEL Process

    Description of Figure A-4 follows
    Description of "Figure A-4 Creating the BPEL Process"

  8. Verify that "Expose as a SOAP service" is checked. Click OK.

  9. You have now created an empty and default BPEL application (Figure A-5).

    In the Oracle JDeveloper main window you can view the following components of the application under the Composite.xml tab.

    • The left box is the definition of a Web Service client that is used to initiate an application.

    • The middle box is a BPEL process that creates and formats the message and calls the messaging service.

    Note:

    You must later create the messaging service resource that is used to send the message when you create the User Notification BPEL process (steps 13-19).

    Figure A-5 Empty and Default BPEL Application

    Description of Figure A-5 follows
    Description of "Figure A-5 Empty and Default BPEL Application"

  10. Expand the xsd folder in the Application Navigator and open BPELProcess1.xsd by double-clicking it (Figure A-6).

    Figure A-6 Accessing the BPELProcess1.xsd File

    Description of Figure A-6 follows
    Description of "Figure A-6 Accessing the BPELProcess1.xsd File"

  11. Click on the Source tab (Figure A-7).

  12. Perform the following modifications to the inputs of this BPEL application:

    In the generated file, SendMessage.xsd, in the xsd folder in the application navigator under projects, the following element definition is created by default:

    <element name="input" type="string"/>
    

    This xsd element defines the input for the BPEL process.

    Select the Source tab (Figure A-7), and replace the line above with the following three lines:

    <element name="to" type="string"/>
    <element name="subject" type="string"/>
    <element name="body" type="string"/>
    

    Figure A-7 Modifying the Inputs in the BPELProcess1.xsd File

    Description of Figure A-7 follows
    Description of "Figure A-7 Modifying the Inputs in the BPELProcess1.xsd File"

  13. Perform a File, Save All.

  14. View the expanded process element (Figure A-8).

    Figure A-8 Viewing the Expanded Process Element

    Description of Figure A-8 follows
    Description of "Figure A-8 Viewing the Expanded Process Element"

  15. To enable messaging in this process, drag and drop User Notification from BPEL Activities and Components located in the Component Palette between the receiveInput and callbackClient activities.

    The User Notification activity appears (Figure A-9).

    Figure A-9 User Notification Activity Before Configuring the Inputs

    Description of Figure A-9 follows
    Description of "Figure A-9 User Notification Activity Before Configuring the Inputs"

  16. Click the XPath Expression Builder icon to the right of the "To:" input box.

  17. Modify the expression for the recipient, "to", as follows:

  18. Click the XPath Expression Builder icon to the right of the "subject:" input box.

  19. Modify the expression for the subject as follows:

  20. Click the XPath Expression Builder icon to the right of the "body:" input box.

  21. Modify the expression for the body as follows:

A.1.4 Creating a New Application Server Connection

Perform the following steps to create a new Application Server Connection.

  1. Create a new Application Server Connection by right-clicking the project and selecting New, Connections, and Application Server Connection (Figure A-15).

    Figure A-15 New Application Server Connection

    Description of Figure A-15 follows
    Description of "Figure A-15 New Application Server Connection"

  2. Name the connection “SOA_server” and click Next (Figure A-16).

  3. Select "WebLogic 10.3" as the Connection Type.

    Figure A-16 New Application Server Connection

    Description of Figure A-16 follows
    Description of "Figure A-16 New Application Server Connection"

  4. Enter the authentication information. The typical values are:

    Username: weblogicPassword: weblogic

  5. On the Connection screen, enter the hostname, port and SSL port for the SOA admin server, and enter the name of the domain for WLS Domain.

  6. Click Next.

  7. On the Test screen click Test Connection.

  8. Verify that the message “Success!” appears.

    The Application Server Connection has been created.

A.1.5 Deploying the Project

Perform the following steps to deploy the project:

  1. Deploy the project by selecting the SendMessage project, Deploy, SendMessageProj, to, and SOA_server (Figure A-17).

    Figure A-17 Deploying the Project

    Description of Figure A-17 follows
    Description of "Figure A-17 Deploying the Project"

  2. Verify that the message "Build Successful" appears in the log.

  3. Enter the default revision and click OK.

  4. Verify that the message "Deployment Finished" appears in the deployment log (Figure A-18).

    Figure A-18 Verifying that the Deployment is Successful

    Description of Figure A-18 follows
    Description of "Figure A-18 Verifying that the Deployment is Successful"

    You have successfully deployed the application.

    Before you can run the sample you must configure any additional drivers in Oracle User Messaging Service and configure a default device for the user receiving the message in User Messaging Preferences, as described in the following sections.

    Note:

    Refer to "Configuring Notifications" in the Oracle Fusion Middleware SOA Developer's Guide for more information.

A.1.6 Configuring User Messaging Preferences

For users to receive the notifications, they must register the devices that they use to access messages through User Messaging Preferences. Perform the following steps:

  1. Log into the User Messaging Preferences application at one of the following URLs:

    • Directly at http://<server>:<port>/sdpmessaging/userprefs-ui

    • Through the Worklist application's Preferences > Notification tab at: http://<server>:<port>/integration/worklistapp

    The User Messaging Preferences application appears.

  2. Click on the Messaging Channels tab (Figure A-19).

    Figure A-19 Messaging Channels Tab

    Description of Figure A-19 follows
    Description of "Figure A-19 Messaging Channels Tab"

    You are prompted for login credentials.

  3. In the Messaging Channels tab, select a channel.

  4. Set a channel as the default by expanding the device folder, and then clicking Set as Default adjacent to the selected channel.

    A checkmark appears next to the selected channel, designating it as the default means of receiving notifications. All messages sent to that user are sent to that channel.

A.1.7 Testing the Sample

The following steps describe how to perform a test message transmission through Enterprise Manager.

Perform the following steps to run and test the sample:

  1. Open a Web browser window and login to Enterprise Manager for the SOA domain. For example, http://<host>:<port>/em .

  2. In Enterprise Manager, expand the SOA folder in the navigation tree, and click the deployed SendMessageProj composite application. Click the Test button to launch the test client page.

  3. In the Input Arguments section provide the input values for invoking SendMessageProj.

    Enter the following values:

    • to: weblogic (the user)

    • subject: notification test (the subject)

    • body: the message content

  4. Click Test Web Service.

A.1.7.1 Verifying the Execution of Sending the E-mail

Log in to the Human Workflow Engine. Verify the outgoing notifications and their statuses from the Notification Manager tab. (Figure A-20).

Figure A-20 Viewing Outgoing Notifications

Description of Figure A-20 follows
Description of "Figure A-20 Viewing Outgoing Notifications"

A.2 Send Email with Attachments

This chapter describes how to build and run the Send Email with Attachments application provided with Oracle User Messaging Service.

Note:

To learn about the architecture and components of Oracle User Messaging Service, see Oracle Fusion Middleware Getting Started with Oracle SOA Suite.

This chapter contains the following sections:

A.2.1 Overview

The "Send Email With Attachment" application demonstrates a BPEL process that sends an e-mail with an attached file. A BPEL process looks up a user's e-mail address from the identity store, reads a file from the file system, creates e-mail content and then sends an email to the user.Section A.2.5, "Building the Sample" shows you how to add an e-mail with attachments to your SOA composite application, allowing your applications to be enabled with messaging.If you want to model the application from scratch, go to the section titled Building the Sample. Or, you can directly use the pre-built project provided with this tutorial.Before you run the pre-built sample or build the application from scratch, you must install and configure the server as described in Section A.2.2, "Installing and Configuring SOA and User Messaging Service". By default, soa-infra does not send out notifications. The following steps describe installing and configuring the e-mail drivers needed to communicate with the e-mail server.

A.2.1.1 Provided Files

The following files are included in the sample application:

  • ns_sendemail.pdf – this document.

  • Project – the directory containing Oracle JDeveloper project files.

  • Readme.txt.

  • Release notes

A.2.2 Installing and Configuring SOA and User Messaging Service

The installation of SOA and User Messaging Service has already been performed on your hosted instance, and the sample user, "weblogic", has already been created. Perform the following steps to enable notifications in soa-infra, if not already done:

  1. Using Enterprise Manager, go to "soa-infra" > (Menu) > Workflow Notification Properties, and set Notification Mode to ALL.

  2. Configure the User Messaging drivers if required as described in "Configuring Drivers" in the Oracle Fusion Middleware SOA Administrator's Guide.

  3. Set the email address for user "weblogic" by using the JXplorer LDAP browser. Refer to "Updating Addresses in Your LDAP User Profile".

  4. Restart the server.

A.2.2.1 Updating Addresses in Your LDAP User Profile

Perform the following steps to set the email address for user "weblogic" by using the JXplorer LDAP browser:

A.2.2.1.1 Installing

Download and install JXplorer from http://www.jxplorer.org.

A.2.2.1.2 Connecting
  1. Set the embedded LDAP server admin password as follows:

    • Login to the WLS Admin Console.

    • Click on the domain name link > Security > Embedded LDAP.

    • Enter a new "Credential" and "Confirm Credential" (for example, "weblogic").

    • Click Save.

  2. Connect from JXplorer by specifying the fields in Table A-2:

Table A-2 JXplorer Connection Fields

Field Value

Host

WLS AdminServer hostname

Port

WLS AdminServer port

Protocol

LDAP v3

Security Level

User + Password

User DN

cn=Admin

Password

<password> (for example, weblogic)


A.2.2.1.3 Setting User Messaging Device Addresses in LDAP

The following example uses the user "weblogic". You may create and use additional users.

  1. Expand the LDAP tree as follows: domain > myrealm > people > weblogic.

  2. Click on the user entry.

  3. Select the HTML view tab on the right.

  4. Enter the desired Email Address and Mobile Phone Number.

  5. Click Submit.

A.2.3 Running the Pre-Built Sample

Perform the following steps to run and deploy the pre-built sample application:

  1. Open SendEmailWithAttachmentsApp.jws (contained in the .zip file) in Oracle JDeveloper.

    In the Oracle JDeveloper main window you can view the following components of the sample application under the Composite.xml tab.

    Figure A-21 Oracle JDeveloper Main Window

    Description of Figure A-21 follows
    Description of "Figure A-21 Oracle JDeveloper Main Window"

    • The left box is the definition of a Web Service client that is used to initiate an application.

    • The middle box is a BPEL process that creates and formats the message and calls the messaging service.

    • The right box is the messaging service resource that is used to send the message.

  2. Create an Application Server Connection by right-clicking the project in the navigation pane and selecting New. Follow the instructions in Section A.2.6, "Creating a New Application Server Connection".

  3. Deploy the project by selecting the SendEmail project, Deploy, SendEmailProj, to, and SOA_server (Figure A-22).

    Figure A-22 Deploying the Project

    Description of Figure A-22 follows
    Description of "Figure A-22 Deploying the Project"

  4. Verify that the message "Build Successful" appears in the log.

  5. Enter the default revision and click OK.

  6. Verify that the message "Deployment Finished" appears in the deployment log.

    You have successfully deployed the application.

    Before you can run the sample you must configure any additional drivers in Oracle User Messaging Service and configure a default device for the user receiving the message in User Messaging Preferences, as described in the following sections.

    Note:

    Refer to "Configuring Notifications" in the Oracle Fusion Middleware SOA Developer's Guide for more information.

A.2.4 Testing the Sample

The following steps describe how to perform a test message transmission through Enterprise Manager.

Perform the following steps to run and test the sample:

  1. Open a Web browser window and login to Enterprise Manager for the SOA domain. For example, http://<host>:<port>/em.

  2. In Enterprise Manager, expand the SOA folder in the navigation tree, and click the deployed SendEmailWithAttachmentsProj composite application. Click the Test button to launch the test client page.

  3. In the Input Arguments section provide the input values for invoking SendEmailWithAttachmentsProj.

    Enter the following values:

    • to: weblogic (the user)

    • subject: notification test (the subject)

    • body: the message content

    • attachmentName: the name of the being attached, including extension.

    • attachmentMimeType: for example, image/gif.

      To send files such as pdf, doc, gif or jpeg files, the following values can be used for the attachmentMimeType entry:

      • file-name.doc – attachmentMimeType: application/msword

      • file-name.pdf – attachmentMimeType: application/pdf

      • file-name.jpg – attachmentMimeType: image/jpeg

      • file-name.gif – attachmentMimeType: image/gif

    • attachmentURI: the URI for the attachment

  4. Click Test Web Service.

A.2.4.1 Verifying the Execution

Check the weblogic e-mail account to verify it has received an email with attachment.

A.2.5 Building the Sample

Performing the following procedure of building the sample from scratch allows you to learn how to add messaging to your SOA Composite Applications, and use User Messaging Preferences.

  1. Open Oracle JDeveloper 11g.

  2. Create a new application by selecting File, New, Applications, and SOA Application. Click OK.

  3. Enter the Application Name and click Next (Figure A-23).

    Figure A-23 Creating a New Application and Project (1 of 3)

    Description of Figure A-23 follows
    Description of "Figure A-23 Creating a New Application and Project (1 of 3)"

  4. Enter the name for the project and click Next (Figure A-24).

  5. Figure A-24 Creating a New Application and Project (2 of 3)

    Description of Figure A-24 follows
    Description of "Figure A-24 Creating a New Application and Project (2 of 3)"

  6. Select the Composite With BPEL composite template (Figure A-25). Click Finish.

    Figure A-25 Creating a New Application and Project (3 of 3)

    Description of Figure A-25 follows
    Description of "Figure A-25 Creating a New Application and Project (3 of 3)"

  7. In the Create BPEL Process window, enter the BPEL process name as "SendEmailWithAttachments" (Figure A-26). Click OK.

    Figure A-26 Creating the BPEL Process

    Description of Figure A-26 follows
    Description of "Figure A-26 Creating the BPEL Process"

  8. Verify that "Expose as a SOAP service" is checked. Click OK.

  9. You have now created an empty and default BPEL application.

    In the Oracle JDeveloper main window you can view the following components of the sample application under the Composite.xml tab.

    • The left box is the definition of a Web Service client that is used to initiate an application.

    • The middle box is a BPEL process that creates and formats the message and calls the messaging service.

      Note:

      You must later create the messaging service resource that is used to send the message when you create the User Notification BPEL process (steps 13-19).
  10. Expand the xsd folder in the Application Navigator and open SendEmailWithAttachments.xsd by double-clicking it (Figure A-27).

    Figure A-27 Accessing the SendEmailWithAttachments.xsd File

    Description of Figure A-27 follows
    Description of "Figure A-27 Accessing the SendEmailWithAttachments.xsd File"

  11. Click on the Source tab (Figure A-27).

  12. Perform the following modifications to the inputs of this BPEL application:

    In the generated file, SendEmailWithAttachments.xsd, in the xsd folder in the application navigator under projects, the following element definition is created by default:

    <element name="process">
      <complexType>
        <sequence>
          <element name="input" type="string"/>    </sequence>
      </complexType>
    </element>
    

    Select the Source tab, and replace the lines above with the following:

    <element name="process">
    <complexType>
         <sequence>
           <element name="to" type="string"/>
           <element name="subject" type="string"/>
           <element name="body" type="string"/>
           <element name="attachmentName" type="string"/>
           <element name="attachmentMimeType" type="string"/>
           <element name="attachmentURI" type="string"/>
         </sequence>
       </complexType>
     </element>
    

    This xsd element defines the input for the BPEL process.

    Figure A-28 Editing Email

    Description of Figure A-28 follows
    Description of "Figure A-28 Editing Email"

  13. Save the project.

  14. Select the SendEmailWithAttachments.bpel editor screen.

  15. Drag and drop Email Activity from BPEL Activities and Components located in the Component Palette between the receiveInput and callbackClient activities (Figure A-28).

  16. In the Edit Email window, leave the From account as “Default”.

    Figure A-29 Edit Email Window

    Description of Figure A-29 follows
    Description of "Figure A-29 Edit Email Window"

  17. To create the expression for To, select the Expression Builder (the second icon, Figure A-30) and perform the following steps:

    • Select Identity Service Functions from the functions drop down list.

    • Select the getUserProperty() function and select Insert into Expression.

    • Under BPEL variables select Variables->Process->Variables->inputVariable ->payload-> client:process->client:to.

    • Click Insert into Expression.

    • Type the string 'mail' manually.

    • Correct the parenthesis so they are matched.

    • Click OK.

    This expression (Figure A-30) takes the data from the Web Service and maps it to the business e-mail of the local SOA user.

    Figure A-30 Expression Builder for the To Path

    Description of Figure A-30 follows
    Description of "Figure A-30 Expression Builder for the To Path"

    The expression must appear as follows:

    ids:getUserProperty(  bpws:getVariableData('inputVariable','payload', '/client:process/client:to'),'mail')
    
  18. For Subject, select the Expression builder. Select getVariableData from Functions and click Insert Into Expression.

    Figure A-31 shows the Expression Builder for the Subject.

    Figure A-31 Expression Builder for the Subject

    Description of Figure A-31 follows
    Description of "Figure A-31 Expression Builder for the Subject"

    The expression must appear as follows:

    bpws:getVariableData( 'inputVariable', 'payload','/client:process/client:subject')
    
  19. For “Body” select the Expression Builder and set the expression as shown in Figure A-32.

    Figure A-32 Expression Builder for the Body

    Description of Figure A-32 follows
    Description of "Figure A-32 Expression Builder for the Body"

    The expression must appear as follows:

    bpws:getVariableData('inputVariable','payload','/client:process/client:body') 
    
  20. In the Edit Email window (Figure A-33), ensure that the Multipart Message with attachments box is checked.

    When an e-mail has multiple parts, the attachment count includes the body that is set with the Wizard above. The body specified by the Wizard above is set as the first body part. For example, to represent a multipart mail with one (1) attached file, enter “2” as the number of body parts. When there is one attachment, enter '1' as the number of body parts.

    Figure A-33 Edit Email Window

    Description of Figure A-33 follows
    Description of "Figure A-33 Edit Email Window"

  21. Set the attachments:

    Each body part has three attributes: MimeType, BodyPartName and ContentBody. By default, the wizard generates default names, MIME types and contents for each of the attachments. The assignment of these body parts has to be changed to set the correct data by modifying the copy rules in the assign activity in the notification scope. The copy rules (specified in the Copy Operation tab) are grouped for each assignment in the following order (the copy-to constructs are also listed):

    MimeType - <to variable="varNotificationReq" part="EmailPayload"
     query="/EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ns1:BodyPart[2]/
    ns1:MimeType"/>
    
    Name - <to variable="varNotificationReq" part="EmailPayload"
     query="/EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ns1:BodyPart[2]/
    ns1:BodyPartName"/>                   
    
    Contents - <to variable="varNotificationReq" part="EmailPayload"
     query="/EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ns1:BodyPart[2]/
    ns1:ContentBody"/>
    
    1. Expand the Email Node by selecting the plus sign icon (Figure A-34).

      Figure A-34 Expanding the Email Node

      Description of Figure A-34 follows
      Description of "Figure A-34 Expanding the Email Node"

    2. Double-click the EmailParamAssign node (Figure A-35).

      Figure A-35 Email ParamAssign Node

      Description of Figure A-35 follows
      Description of "Figure A-35 Email ParamAssign Node"

      When making changes in the EmailParamAssign node (for example, editing the XPath variables), perform a Save All from the File menu after making each change. This ensures that the changes are reflected in the .bpel file.

    3. To edit the mimeType of the second body part (the first body part is the contents set in the wizard) select the second body part variable ending with “MimeType” by double-clicking it (Figure A-36).

      Figure A-36 Editing the mimeType of the Second Body Part

      Description of Figure A-36 follows
      Description of "Figure A-36 Editing the mimeType of the Second Body Part"

    4. Edit the XPath as shown below (Figure A-37):

      From: /client:process/client:attachmentMimeType, To: /EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ ns1:BodyPart[2]/ns1:MimeType  
      

      Figure A-37 Editing the XPath for mimeType

      Description of Figure A-37 follows
      Description of "Figure A-37 Editing the XPath for mimeType"

    5. Save the project.

    6. To edit the attachment name for the second attachment, select the second body part variable ending with “BodyPartName” by double-clicking it (Figure A-38).

      Figure A-38 Editing the Attachment Name for the Second Attachment

      Description of Figure A-38 follows
      Description of "Figure A-38 Editing the Attachment Name for the Second Attachment"

    7. Edit the XPath as shown below:

      From: /client:process/client:attachmentName To: /EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart /ns1:BodyPart[2]/ns1:BodyPartName 
      

      Figure A-39 Editing the XPath for BodyPartName

      Description of Figure A-39 follows
      Description of "Figure A-39 Editing the XPath for BodyPartName"

    8. Save the project.

    9. To edit the attachment contents of the second attachment, select the second body part variable ending with “ContentBody” by double-clicking it (Figure A-40).

      Figure A-40 Editing the Attachment Contents of the Second Attachment

      Description of Figure A-40 follows
      Description of "Figure A-40 Editing the Attachment Contents of the Second Attachment"

    10. Edit the XPath as shown below (Figure A-41):

      From: ora:readFile(bpws:getVariableData('inputVariable','payload','/client: process/client:attachmentURI')) To:/EmailPayload/ns1:Content/ns1:ContentBody/ns1:MultiPart/ ns1:BodyPart[2]/ns1:ContentBody
      

      ora:readFile() xpath function is available under “BPEL Xpath Extension Functions”.

      Figure A-41 Editing the XPath from the ContentBody

      Description of Figure A-41 follows
      Description of "Figure A-41 Editing the XPath from the ContentBody"

    11. Click OK in the Edit Copy Operation screen.

      Figure A-42 Copy Operations Tab

      Description of Figure A-42 follows
      Description of "Figure A-42 Copy Operations Tab"

    12. Click OK in the assign activity. Save the project.

      The Process Modeling procedure is complete. You can use the information in this procedure to add notification with attachments to your SOA composite application.You can now deploy and run the application as described in Section A.2.3, "Running the Pre-Built Sample".

A.2.6 Creating a New Application Server Connection

Perform the following steps to create a new Application Server Connection.

  1. Create a new Application Server Connection by right-clicking the project and selecting New, Connections, and Application Server Connection (Figure A-43).

    Figure A-43 New Application Server Connection

    Description of Figure A-43 follows
    Description of "Figure A-43 New Application Server Connection"

  2. Name the connection “SOA_server” and click Next (Figure A-44).

  3. Select "WebLogic 10.3" as the Connection Type.

    Figure A-44 New Application Server Connection

    Description of Figure A-44 follows
    Description of "Figure A-44 New Application Server Connection"

  4. Enter the authentication information. The typical values are:

    Username: weblogicPassword: weblogic

  5. On the Connection screen, enter the hostname, port and SSL port for the SOA admin server, and enter the name of the domain for WLS Domain.

  6. Click Next.

  7. On the Test screen click Test Connection.

  8. Verify that the message “Success!” appears.

    The Application Server Connection has been created.