Smarts SAM: Is it safe to call the changed() function from within a hookscript?
book
Article ID: 303714
calendar_today
Updated On:
Products
VMware
Issue/Introduction
Symptoms:
Smarts SAM: Is it safe to call the changed() function from within a hookscript? Smarts SAM: Can the changed() function be called from within a hookscript?
Smarts SAM: What are the effects of calling the changed() function from within a hookscript?
Occasionally, the front-end adapter or a subscription to a notification list gets a copy of the notification prior to hookscript completing its processing.
Environment
VMware Smart Assurance - SMARTS
Resolution
Is is not advised to call changed() within the hookscript. notif->changed() should be called only after the hookscript returns and not before.
This changed() invocation triggers evaluation of the notification by Notification Lists. So even though the (unenhanced) notification object might exist when the hook is invoked, it should not be being evaluated by the Notification Lists until the hook returns and the ancillary data is in place.