Sending change notifications using a Workflow

Database Monitor can automatically respond to database changes by either notifying one or more people, or by automatically launching custom programs. This part of Database Monitor is referred to as the Workflow component. For the following example, we will configure Database Monitor to notify a person by email when there has been a change to any record in the file TSTEMP.

To notify users that a file has changed

  1. In the Database Monitor Configuration - Files panel, enter 20 for TSTEMP. Use 4 to delete the existing "Test Notify" Workflow. For this demonstration we will create a new one.
  2. Press F6. The Add New Record panel appears.
  3. For Description, enter "Test Notify" and ensure Active is set to Y.
  4. Press Enter to create the Workflow.
  5. Enter 10, Criteria, then press F6 to Create. Here, you define the Criteria for the Workflow (i.e. the fields you would like to report on).
  6. Enter a 1 for *RECORD. This indicates you want to report whenever a change to any field in the file is made.
  7. Since we selected *RECORD in the previous step, the options under the "Record level types" heading apply to this Workflow. For this example, we will enter CH to indicate we want to report any change to a record in the file.
  8. Use the Record Level Criterion panel to specify what kind of action to report on for this Workflow.

  9. Press Enter twice. The specified Criteria has been added to the Workflow. Now, specify the action to take once this condition (a change to any record in the file) has been met. For this example, we will notify someone by email that the change has been made.
  10. Press F3 to return to the previous screen (IDT510-01) and enter option 11, Users/Depts, for Test Notify.
  11. Press F6, Create. An Add New Record panel appears with many options relating to who to alert. Here, you can tell Database Monitor to notify a user by email, and have that user digitally sign to acknowledge the change to the file.
  12. To send the email to a user who has already been configured as a Database Monitor user, configure this screen as follows.

    To send the email to an external user, you can configure the screen as follows:

    Note: See Workflow - Users for more details regarding the options on this screen.

  13. Press Enter to save and review the recipient(s) who will be notified. Now, when a change is made to the file TSTEMP, a notification email will be sent to all the users/email addresses listed here.
  14. You must refresh the Workflow list in order for Workflow changes to take effect immediately. To do this:

  15. Press F3 three times to return to the main menu.
  16. Enter option 17 to open the Database Monitor Manager.
  17. After Command, replace the existing text with REFMON and press Enter.
  18. For Workflow changes to take effect immediately, you must run the REFMON command to refresh the Workflow list (otherwise, the Workflow change will take effect later after a periodic routine).

    Note: Remember you can display a list of all Database Monitor commands using the command HELP.

  19. If you would like to test this Workflow, simply change a record in the file. Press F3 to return to the Main Menu and then press F21 to open the command prompt.
  20. Enter UPDDTA DATATHREAD/TSTEMP.
  21. Press Page Down to display the first record.
  22. Change one or more of the fields and press Enter. For this example, the Employee Name will be changed.
  23. Press Enter. The email notification is sent to the defined recipients, including a list of all changes made to the file.