Creating a simple Correspondence Model

In this example, we create a simple Correspondence model for Email correspondence. The correspondence uses process data and user data, which will be replaced directly in the message editor. The complete example model CorrespondenceExample can be found in the example ZIP file in folder correspondence:

Viewing the simple Correspondence Model

In this section we have a look at the CorrespondenceExample. It contains the primitive data CustomerId, UserEmail and Fax. The correspondence process startCorrespondence consists of the following elements:

  1. A manual activity to enter data for CustomerId, UserEmail and Fax.
  2. A UI Mashup activity implementing our UI Mashup correspondence application.
  3. An in- and out-data path from structured data CORRESPONDENCE to the UI Mashup activity.
  4. A Show Data activity to view the email data.

The process supports process attachments and contains in-data paths for all three primitive data.

Correspondence Process Data Paths
Figure: Correspondence Process Data Paths

The process diagram looks as in the following screenshot:

Correspondence Process
Figure: Correspondence Process

Preparing the Correspondence in the Correspondence UI Mashup

To create our correspondence, deploy the example model and perform the steps described in this section.

Creating a User with User Details

In the Participant Manager view create a user with user details providing a description and validity dates.

Create User
Figure: Create a User with Details

Assign this user to the Administrator role.

Starting the Correspondence Process

  1. Login with the created user and start the correspondence process in the Workflow Execution perspective.
  2. In the first activity, enter data for name, email and fax number and complete. Note that the fax must be addressed in the specified default format to be recognized in the address picker. If you have not set it otherwise in the Configuration Panel, the default format is ^\(?[0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$. For example: 111 222 4711.

  3. The Correspondence UI Mashup opens.

Adding Recipient and Subject

  1. In the correspondence UI Mashup, select Email as default type.


  2. Click on the To entry to open the address picker.

  3. In the address picker select the Fax checkbox.

  4. Select the fax and email address, which you have entered as data.

  5. See the fax and email address added in the upper part of the dialog and click OK.
  6. The fax and email are added as recipients in the To entry field.

  7. Add a subject for the email and fax.

Adding Content in the Message Content Editor

In the message content area, click the Source button.

Source Button
Figure: Click the Source Button

Enter the following text for the correspondence in the content editor:

<p>Dear $user.firstName $user.lastName,</p>

<p>Your account <b>$user.account</b> has been created with Customer Id <b>$CustomerId</b>.<br>
It is valid from $user.validFrom until $user.validTo.</p>
<p>Your work description is the following: "$user.description"</p>

<p>You have the following grants: <b>$user.allGrants</b></p>

<p>Welcome on board!!!</p>

<p>Sincerely, Team ABC</p>

Figure: Adding email content

In this content we use user attributes as well as process data. These will be substituted with their values once we click the Source button again.

Figure: Adding email content

Complete the UI Mashup activity. The Show Data activity displays correspondence meta data.

Show Data
Figure: Displayed Correspondence data

Viewing the Correspondence in the Document Folder

In the Document Repository view or the Process Documents section in the process history view of the startCorrespondence process, expand the correspondence folder.

You see the created correspondence, named as correspondence-out-x.

To view the correspondence in read-only mode, click the created correspondence node correspondence-out-x.

Click Correspondence
Figure: Click Correspondence

The correspondence opens in a read-only viewer. You see the placeholders substituted with our entered workflow data and user details.

Viewing the Correspondence
Figure: Viewing the Correspondence in read-only mode