Unsolved
This post is more than 5 years old
11 Posts
0
1432
March 5th, 2012 18:00
ASL script running as DXA issues
Hi,
I want to do some test for the asl running as DXA hookscript. According to the documentation, using self->object("xxx"), we can get the objects existed in INCHARGE-SA domain manager. I have write a simple asl script as follows:
START{
..eol
}do{
notifyObj = self->object("ICS_Notification","xxx");
print(notifyObj->CreationClassName);
}
when i execute this asl using sm_adapter simple.asl, it will generate the exception as follows:
ICS_Notification: Class of given name not found
So i am wondering that only the object's class name start with "GA" can be create with using self->object or self->create.
The functionality for the script is getting the notification object in INCHARGE-SA domain manager, fetching some properties of the notification to get more detail information from underlying domain managers such as AM PM.. So in other word, this DXA script will connect two domain managers , one is INCHARGE-SA and the other is underlying domain managers.
So could you please give me some suggestion about it?
Thanks
BRs
David Wang
Lokeshdotp
2 Posts
0
March 13th, 2012 06:00
When you are testing any ASL scripts which involve some kind of code linked with Topology like yours, that you are using a class "ICS_Notification" which is only present in SA config,
but you are executing your script without the -s or -server option, so the sm_adapter binary fails to locate that class
try running with sm_adapter -s INCHARGE-SA simple.asl
bkuhhirte
52 Posts
0
June 29th, 2012 09:00
You need to be a little careful about testing the notification hooks. The reason is that the "self" references can sometimes point to places you don't want it to.
When the hook is running within SAM, the default calls to object(), getInstances(), etc. will all point to the "source" domain and the self->object(), self->getInstances(), etc. all point to the "destination" domain.
When you run that same hook in a stand-alone configuration, the self-> points to the object store *within* the adapter, not the SAM/OI domain you want to touch. Hence the "ICS_Notification class not found" message.
Regards,
Bill