Scenario: To announce a CEO change, a company wants to send an email to every address it has access to. Only one email should go out to each address. A workflow process retrieves the email list, removes duplicate entries, and sends an email to each unique entry.
Process: This process is built in an auto start Workflow-type project.
The following screen shot shows the process:
A custom database integration component retrieves all email addresses. This component returns an array of email addresses called AllEmailAddressList.
Next, a Test Collection for Duplicates component tests the array AllEmailAddressList for duplicates.
The following screen shot shows the editor for the Test Collection for Duplicates component:
The component takes in the array variable (string type) AllEmailAddressList and tests it for duplicates. The "Output Distinct Values List" option is checked, meaning that the component removes duplicate entries. The component outputs the array of unique values as the variable AllEmailAddressListNoDuplicates.
Next, a For Each Element in Collection component hands email addresses one at a time to the Send Email component. This is necessary because the Send Email component can only send one email at a time. When the For Each Element in Collection component exhausts the list of email addresses, it exits through the "finished" path and the process ends.
Other components in this example are as follows:
This component is a custom component created with the Integration Engine.
For more information on the Integration Engine, see the Workflow Solution Administrator's Guide.