uCosminexus Service Platform, Overview

[Contents][Glossary][Index][Back][Next]

2.12.2 System using the mail adapter

The mail adapter can invoke a mail server that supports the SMTP protocol as a service in Service Platform.

You can use the mail adapter to send notification email messages to users and a system administrator when a business process ends normally or if a system failure occurs. The mail adapter can also be linked with FTP reception and an FTP adapter to add any file to email.

Examples of a system using the mail adapter are as follows:

Each example in the system is described below. For details about FTP reception and FTP adapter functionality, see Chapter 8. Functionality to Transfer Files by Integrating with FTP (FTP Integration).

Organization of this subsection
(1) Sending email with a file transferred from an FTP client attached
(2) Sending email with an attached file (acquired from an FTP server)
(3) Sending an authorization request for a workflow item by email
(4) Sending a completion notification of an asynchronous business process by email
(5) Sending email to notify that an error occurred during execution of a business process

(1) Sending email with a file transferred from an FTP client attached

In this example, a user attaches a file transferred from an FTP client to an email message, and then sends it to another user.

Figure 2-64 Example of a system using the mail adapter (1)

[Figure]

The figure below shows the flow of the email send process and the flow of a file. The following numbers correspond to the numbers in the figure.

  1. The FTP client of user A transfers a file to Service Platform by using the PUT operation. The transferred file is saved in the work folder on the HCSC server created by FTP reception.
  2. The file in the work folder is copied to the common folder by the file operations adapter invoked from the business process. If necessary, the file operations adapter converts the format or file.
  3. The business process invokes the mail adapter.
  4. The file in the common folder is set as an email attachment.
  5. The mail adapter sends an email message to the mail server in the same LAN.
  6. The email message with an attachment is sent from the mail server to user B through the network.

(2) Sending email with an attached file (acquired from an FTP server)

In this example, after the SOAP client starts a business process, a file acquired from the FTP server via the FTP adapter is attached to an email message, and then the email message is sent to another user.

Figure 2-65 Example of a system using the mail adapter (2)

[Figure]

The figure below shows the flow of the email send process and the flow of a file. The following numbers correspond to the numbers in the figure.

  1. The service requester (SOAP client) of user A invokes Web Services in Service Platform.
  2. The FTP adapter is invoked from the business process.
  3. The file is transferred from the FTP server to the common folder by the GET operation of the FTP adapter.
  4. The mail adapter is invoked from the business process.
  5. The file saved in the common folder is set as an email attachment.
  6. The mail adapter sends an email message to the mail server in the same LAN.
  7. The email message with an attachment is sent from the mail server to user B through the network.

(3) Sending an authorization request for a workflow item by email

In this example, after a workflow application is invoked from the business process via the service adapter, an authorization request email message is sent to the authorizer, and then the workflow process is performed.

Figure 2-66 Example of a system using the mail adapter (3)

[Figure]

The figure below shows the flow of the email send process. The following numbers correspond to the numbers in the figure.

  1. The service requester (SOAP client) of user A invokes Web Services in Service Platform.
  2. A workflow application is invoked from the business process via the service adapter.
  3. The workflow process starts, and then enters authorization process wait mode.
  4. The mail adapter is invoked from the business process.
  5. The URL of the authorization site is set in the email body.
  6. After the email message is sent to user B (authorizer), user B clicks the URL in the body of the email message to perform the authorization process.

(4) Sending a completion notification of an asynchronous business process by email

In the case of asynchronous business processes, even if processing of a business process continues after a response is sent to the service requester, the user will not be notified of completion of subsequent processing. In this example, the mail adapter is used to notify the user by email that an asynchronous business process has completed.

Figure 2-67 Example of a system using the mail adapter (4)

[Figure]

The figure below shows the flow of the email send process. The following numbers correspond to the numbers in the figure.

  1. The service requester (SOAP client) of user A invokes Web Services in Service Platform.
  2. A response message is returned to the service requester of user A.
  3. The service adapter is invoked from the asynchronous business process, and then the service is executed.
  4. The mail adapter is invoked from the asynchronous business process.
  5. Text indicating that the service invocation process has completed normally is entered in the body of the email message.
  6. After the email message is sent to user B, user B confirms that the process has completed.

(5) Sending email to notify that an error occurred during execution of a business process

In this example, if an error occurs during service invocation in the business process, the system administrator is notified of the error by email.

Figure 2-68 Example of a system using the mail adapter (5)

[Figure]

The figure below shows the flow of the email send process. The following numbers correspond to the numbers in the figure.

  1. The service requester (SOAP client) of user A invokes Web Services in Service Platform.
  2. An error occurs during service invocation within the scope of the business process, and then a fault message is returned to the service requester.
  3. Processing of the business process moves to the fault process, which is the flow for handling errors.
  4. The mail adapter is invoked in the fault process.
  5. An error message is entered in the body of the email message.
  6. After the email message is sent to user B (system administrator), user B confirms that an error occurred, and then performs troubleshooting.