Skip to main content

Practice: Create A Threshold

Objective

To use a Threshold to trigger a job to run and use Notifications to let you know that the threshold is incrementing and decrementing.

Instructions

Create the Threshold

  1. In Library > Administration, select Thresholds.
  2. Click Add.
  3. In the Thresholds pop-up:
  • In the Name field, enter TrainingThreshold.
  • In the Value field, enter a value of 0.
  • In the Description field, enter in some documentation.
  • Click the Save button.
  1. Click Back.

Create the Schedule

  1. In Library > Administration, select Master Schedule.
  2. Click Add button.
  3. On the Master Schedule Definition screen:
  • In the Schedule Name field, enter Threshold Schedule.
  • Add Documentation
  • Monday - Sunday are working days.
  • Do NOT use the Master Holiday Calendar.
  • Auto Build 7 days in advance for 1 days.
  • Auto Delete 7 days ago.

Create the Jobs

  1. In Studio, select Threshold Schedule and click View.
  2. In the side menu, select Add Job.
  3. In the Master Job Definition screen:
  • In the Name field, enter Threshold Dependency Job.
  • In the Job Type drop down, select Windows.
  • In the Machine Selection section, select the desired machine from the Machines or Machine Group drop down.
  • In the General section, select the desired user from the User Id drop down.
  • Under the Run section, type the following in the Command Line box:
timeout /t 10
  • Add Documentation.
  • In the Frequency section, create or add desired Frequency.
  1. Click Back to get back to the Studio.
  2. Utilizing the Copy function, copy Threshold Dependency Job to add a second job called, Threshold Update Job.

Create Threshold Dependencies and Updates

  1. In Studio, select the Threshold Dependency Job.
  2. In the side menu, select Add Threshold Dependency.
  3. In the Threshold pop-up window:
  • In the Threshold drop down, select TrainingThreshold.
  • In the Operator drop down, select =.
  • In the Value field, enter 2.
  • Click Save.
  1. In Studio, select the Threshold Dependency Job.
  2. In the side menu, select Add Threshold Update.
  3. In the Threshold pop-up window:
  • In the Threshold drop down, select TrainingThreshold.
  • In the Job Status drop down, select Finish OK.
  • In the Value field, enter 0.
  • Click Save.
  • Click Back.
  1. In Studio, select the Threshold Update Job.
  2. In the side menu, select Add Threshold Update.
  3. In the Threshold pop-up window:
  • In the Threshold drop down, select TrainingThreshold.
  • In the Job Status drop down, select Finish OK.
  • In the Value field, enter 2.
  • Click Save.

Create NULL Jobs and Define the Notify Events

  1. In the side menu in Studio, select Add Job
  2. On the Master Job Definition screen:
  • In the Name field, enter Initial Value Notification.
  • In the Job Type field, leave it as Null Job.
  • Add Documentation.
  • In the Frequency section, create or add the desired Frequency.
  • Click Save.
  1. Click Back to get back to the Studio.
  2. Utilizing the Copy function, copy the Initial Value Notification job to create 2 more jobs. One called, After Update Job and the other called Final Value Job.
  3. Select the Initial Value Notification, click the Wrench icon and enter Admin Mode.
  • In the Event section, click +
  • In the Event pop-up window:
    • In the Send Event On dropdown, select Job Status.
    • In the Job Status dropdown, select Finished OK.
    • In the Event Template dropdown, select $NOTIFY:EMAIL and update the Events parameters as follows:
      • In the To, enter desired email.
      • In the Subject, enter Initial value of TrainingThreshold
      • In the Message, enter Initial value of TrainingThreshold is [[TH.TrainingThreshold]]
    • Click the Save button.
  • Click the Save button in Master Job Definition.
  • Click Back
  1. Select the After Update Job, click the Wrench icon and enter Admin Mode.
  • In the Event section, click +
  • In the Event pop-up window:
    • In the Send Event On dropdown, select Job Status.
    • In the Job Status dropdown, select Finished OK.
    • In the Event Template dropdown, select $NOTIFY:EMAIL and update the Events parameters as follows:
      • In the To, enter desired email.
      • In the Subject, enter After the Update
      • In the Message, enter After the update the value of TrainingThreshold is [[TH.TrainingThreshold]]
    • Click the Save button.
  • Click the Save button in Master Job Definition.
  • Click Back
  1. Select the Final Value Job, click the Wrench icon and enter Admin Mode.
  • In the Event section, click +
  • In the Event pop-up window:
    • In the Send Event On dropdown, select Job Status.
    • In the Job Status dropdown, select Finished OK.
    • In the Event Template dropdown, select $NOTIFY:EMAIL and update the Events parameters as follows:
      • In the To, enter desired email.
      • In the Subject, enter Final value of TrainingThreshold
      • In the Message, enter Final value of TrainingThreshold is [[TH.TrainingThreshold]]
    • Click the Save button.
  • Click the Save button in Master Job Definition.
  • Click Back

Add Job Dependencies

  1. Select the Final Value Job, click Add Dependency in the side menu.
  2. In the Job Dependency pop-up window, select Threshold Dependency Job.
  3. Click Save.
  4. Select the After Update Job, click Add Dependency in the side menu.
  5. In the Job Dependency pop-up window, select Threshold Update Job.
  6. Click Save.
  7. Select the Threshold Update Job, click Add Dependency in the side menu.
  8. In the Job Dependency pop-up window, select Initial Value Notification.
  9. Click Save.

Build the Schedule

  1. In Operations, build the Schedule Released for today.
  2. Be sure the Threshold Schedule is Completed.
  3. Open the email client and check the inbox.
  4. You should find 3 new emails. Open the emails and check the contents.
tip

Once all the dependencies and events have been configured, your workflow should look something like this:

Video Walkthrough

Create A Threshold