Essential ATG Dynamo Training - Got atg Certified Relationship Management Developer?
This is not an official ATG site: ATG, Dynamo, Scenario Server and Personalization Server are trademarks or registered trademarks of Art Technology Group
Articles Exercises Resources Links Search

Essential ATG Dynamo Training - Got atg Certified Relationship Management Developer?
This is not an official ATG site: ATG, Dynamo, Scenario Server and Personalization Server are trademarks or registered trademarks of Art Technology Group
Articles Exercises Resources Links Search

How to issue an Alert

Instructions on how to issue an alert are detailed in the dynamo docs in the 'Adding Custom Alert Messages to Gears' chapter of the Portal Developers Guide.

  1. The Alert Source
    1. Create a subclass of atg.portal.alert.GearMessage for each type of Alert you want to send
    2. Ensure that your Alert source gear has access to the GearMessagePublisher component /atg/portal/alert/GearMessagePublisher either via JNDI lookup or via the nucleus
    3. To send an alert, call writeMessage on the GearMessagePublisher with an instance of your GearMessage subclass.
  2. Scenario Manager Integration
    1. Register your GearMessage subclass in the patch-bay message-registry, this creates the 'custom event' which you'll use in the dispatch scenario
    2. Create a scenario to respond to your new custom event and dispatch the message to the target principal using the Send Alert action (see the example above)
  3. Localize the Gear Alert Messages
    1. Create at least one resource bundle
    2. Add the alertDisplayString property in the resource bundle
    3. Add alerts properties the alertPropertyNames array in the resource bundle
    4. Provide an email template jsp / jhtml file
    5. Specify the alertEmailTemplate property in the resource bundle
  4. Update Alert Preferences Instance Config
    1. Add the alerts configuration section to the gear's instanceConfig as described above
    2. Add the instanceConfig to the gear manifest (if it's a new gear mode)
  5. Register the Alerts with the Portal Alerts Framework
    1. Add Alerts to the gear manifest xml
    2. Reload the gear manifest
  6. Set up the Gear Instance Preferences in the Repository
    1. In the gear's instance config, configure and submit changes to the alert preferences setting the value to yes_locked
  7. Test the gear
    1. Add an alerts gear to your community, if it's not there
    2. Configure the alerts gear to display alerts of the target type which your gear sends
    3. Ensure that your dispatch scenario is enabled
    4. Enable logDebug in the AlertMgr, GearMessagePublisher and the AlertsRepositoryManager.
    5. Cause your gear to send the Alert
    6. View the alerts gear
    7. Examine the debug logs

Next Section



Advertise your Training Programs for Free!