Tying Groovy Script to Object
Can you let me know how I should go about tying the script I’m working on to the object itself? That way, the Event Handler Monitor shows which object is being affected, rather than saying “No Privilege”.
For example, this is the top part of a Save As event, and it pulls the new item number and puts it in the Event Handler Monitor.
void invokeScript(IBaseScriptObj obj) {
String newNumber = obj.getNewNumber()
IAgileSession session = obj.getAgileSDKSession();
IItem newItem = (IItem) session.getObject(ItemConstants.CLASS_DOCUMENTS_CLASS, newNumber);
This script, which makes some updates to the affected items tab of an ECO, does not (even though the code itself is trigger by a status change and only works on that specific ECO anyways).
void invokeScript(IBaseScriptObj obj) {
IAgileSession session = obj.getAgileSDKSession();
IEventInfo req = obj.getPXEventInfo();
IWFChangeStatusEventInfo e = null;
What method should I use here? How can I make the bottom example return the object number it’s working on so that it shows up in the Event Monitor page?
Thank you.
Hi Matt,
This seems to be a known bug that is fixed in Agile 9.3.6. Check out the below documentation in MOS.
“No Privilege” Shows In Event Handler Monitor (Doc ID 2230573.1)
Bug 17969693 : “NO PRIVILEGE” SHOWS IN EVENT HANDLER MONITOR
BR, Nimish
Oh nice, thanks Nimishh.
I’m not good enough at groovy to have known whether or not it was my script. I appreciate you for clarifying.