Table of Contents

Search

  1. Preface
  2. Welcome to Informatica Process Developer
  3. Using Guide Developer for the First Time
  4. Getting Started with Informatica Process Developer
  5. About Interfaces Service References and Local WSDL
  6. Planning Your BPEL Process
  7. Participants
  8. Implementing a BPMN Task or Event in BPEL
  9. Implementing a BPMN Gateway or Control Flow
  10. Using Variables
  11. Attachments
  12. Using Links
  13. Data Manipulation
  14. Compensation
  15. Correlation
  16. What is Correlation
  17. What is a Correlation Set
  18. Creating Message Properties and Property Aliases
  19. Adding a Correlation Set
  20. Deleting a Correlation Set
  21. Adding Correlations to an Activity
  22. Rules for Declaring and Using Correlation Sets
  23. Correlation Sets and Engine-Managed Correlation
  24. Event Handling
  25. Fault Handling
  26. Simulating and Debugging
  27. Deploying Your Processes
  28. BPEL Unit Testing
  29. Creating POJO and XQuery Custom Functions
  30. Custom Service Interactions
  31. Process Exception Management
  32. Creating Reports for Process Server and Central
  33. Business Event Processing
  34. Process Central Forms and Configuration
  35. Building a Process with a System Service
  36. Human Tasks
  37. BPEL Faults and Reports

2. Designer

2. Designer

Email Service

Email Service

Process Server supports an email service. This means you can create a process that sends email messages to a list of recipients via an invoke activity. Many types of processes can benefit from an email delivery activity, including use an Alert Service.
Any BPEL process that implements email-based activities imports the WSDL provided with the Process
Server. The name of the WSDL is
email.wsdl
, and in the Participants view wizards, it is a System Service named
send email
. The WSDL contains a send operation that can be used in an invoke activity as follows:
<invoke inputVariable="emailMessage" operation="send" outputVariable="resultMessage" partnerLink="emailProvider"/>
To create a BPEL process that sends an email:
  1. In the Project Explorer, create a new orchestration project.
  2. Select
    File > New > BPEL Process
    .
  3. Name the process and click Finish.
  4. In the Participants view, create a new Partner Service Provider.
  5. Select System Services.
  6. Select
    Email
    .
  7. From Participants view, drag the
    send
    operation to the canvas to create an invoke activity. This activity sends the email message to people in your identity service enabled on the Process Server.
  8. Add additional programming logic. For example:
    1. Add a receive activity that receives the input to be associated with the email.
    2. Use the input tab of the invoke to assign data to the variable. See the examples below.
  9. Use the send operation's fault message to catch communication errors with your email service.
Example to initialize the emailMessage variable
:
  1. In the
    Input
    tab of the invoke, select XPaths as the Assignment Type.
  2. Select
    Add
    .
  3. In the
    E/L
    panel, select Literal.
  4. In the From column, select the dialog button and generate literal contents. Process Developer automatically finds the correct schema for the selected single-part element-based variable and generates a literal template for you as shown:
    Generated Template
    <aem:emailMessage xmlns:aem="http://schemas.active-endpoints.com/email/2007/01/email.xsd"> <aem:from>string</aem:from> <aem:replyTo>string</aem:replyTo> <aem:to>string</aem:to> <aem:cc>string</aem:cc> <aem:bcc>string</aem:bcc> <aem:subject>string</aem:subject> <aem:body mimeType="string"></aem:body> </aem:emailMessage>
    To avoid errors, be sure to set the body mimeType to a valid type such as
    text/plain
    . See the example in Step 5.
  5. Use one of the following tips to populate the
    emailMessage
    elements with the appropriate strings:
    • Create XPaths expressions, one per element. For example, to populate the <aem:to> element, create an expression such as FROM
      $quoteRequest/quote:contact/quote:name()
      TO
      aem:to
      .
    • Create an expression with a
      doXslTransform
      function. This solution requires that you create an XSL file containing all the transformation details for the email elements. For example,
      doXslTransform ('monitorEmail.xsl', $handleAlertRequest)
    • Set the Assignment Type to XQuery. Then you can add {expressions} or strings directly to each
      emailMessage
      element.
Example
<ns:emailMessage xmlns:ns="http://schemas.active-endpoints.com/email/2007/01/email.xsd"> <ns:from>Dave Verd &lt; DVerd@mycompany.com &gt;</ns:from> <ns:replyTo>sender@mycompany.org</ns:replyTo> <ns:to>{$quoteRequest/quote:contact/quote:name()}</ns:to> <ns:subject>{ $quoteRequest/quote:contact/quote:description}</ns:subject> <ns:body mimeType="plain/text">Message goes here.</ns:body> </ns:emailMessage>
Deploying a Process as an Email Service
You can deploy your process and make it available as a standard document literal service for the My Role partner link. Note that in the BPR, there are no WSDL or XSD. They are already deployed and available on the server.
If your email list contains an invalid address, the process logs an error. Check the Server Log in the Process Console to view email errors.


Updated March 30, 2020