{sections}

 

{lessontitle}

3.3 Event Actions

Have you ever wanted to push a product to the web automatically? Issue a forecast if a threshold is crossed? Then setting up Event Actions would be helpful.

Event Actions are tasks configured to run after a variable reaches a certain value. Event Actions are configurable.

How Event Actions Work

CHPS generates log messages containing an event code. Those codes can be part of a configuration to trigger an event such as running a task or changing a task schedule.

event action diagram

Examples

Event Actions can be set up to perform the following:

  • Trigger the export of HTML reports after a forecast is approved.
  • Change the interval of a forecast from 12 hours to three.
  • Start a forecast run once new external data becomes available.
  • Send an email when a threshold is crossed (Example: System_Alerter task).

Setting Up an Event Action

Create an Event Action by setting up a configuration file and linking the action to the configuration in the Admin Interface.
  1. Choose an event code to use as a trigger.
  2. Create an action configuration file.
  3. Upload the XML file from Step 2 to the Admin Interface, choosing a suitable action ID.
  4. Create an Event-Action Mapping to link the event code and the action ID.
  5. Schedule the appropriate task with the same tag as configured in the XML file.

Use the following job sheet to add an Event Action.

Job Sheet: Adding an Event Action