Server shut down email notice

book

Article ID: 180798

calendar_today

Updated On:

Products

Workflow Solution

Issue/Introduction

 

Resolution

Server shut down email notice

Scenario: A company plans to shut down some of its servers during the holidays. Most employees are out of the office, but the few who are working need to know when the servers will be unavailable. A workflow process notifies only working employees of the server shutdown.

Process: This process is built in a Workflow-type project.

The following screen shot shows the process:

A custom component begins the process by retrieving employee (user) information from a company database. This component returns an array variable called AllUserInfo of data type UserInfo. This variable contains all basic information (including email address) on every employee in the company. An Add Items to Collection component creates a collection called AllUserInfoCollection.

Another custom component then retrieves user information (including email address) for all employees registered for vacation over the holidays. This component returns an array variable called EmployeesOnVacation of data type UserInfo. A Remove Items from Collection component then removes these items from the collection called AllUserInfoCollection.

The following screen shot shows the Remove Items From Collection editor:

During run-time, this component removes the user information for all employees on vacation from the collection AllUserInfoCollection. When this happens, the collection contains user information only for employees not on vacation - employees who are in the office. These are the employees who need to get the notification email about when the servers will be down.

Next, a For Each Element in Collection component hands user information 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. The For Each Element in Collection component creates an automatic variable that contains a single value (array or single) from the collection. You can rename this automatic variable; we named ours OneEmployeeOnVacation.

The following screen shot shows the For Each Element in Collection editor:

The following screen shot shows the editor for the Send Email component:

When the For Each Element in Collection component exhausts the collection of user information, it exits through the "finished" path and the process ends.

Other components in this example are as follows:

Attachments