Known issue with JavaScript and the UI data provider
How to resolve known issues with user output parameters in a JavaScript policy and the UI data provider.
When you expose a user output parameter inside a JavaScript policy, the user output parameter data when queried from the UI data provider might be blank. To resolve this issue, certain objects inside the JavaScript policy must be deleted, including JavaScript functions and Java objects, typically at the end of the function or policy.
For example, the following JavaScript function must be deleted
before the user output parameters are successfully returned from the UI data provider.
function myFunction() {
//…..
}
delete myFunction;
Additionally, any Java objects that are created inside the JavaScript
policy must be deleted as well. For example,
var myString = NewJavaObject("java.lang.String", ["myString"]);
//…..
delete myString;
If the Java object contains the information that is to be used
in a user output parameter. The value of the Java object must be stored
by using a Netcool®/Impact policy
function to convert the Java object to the correct variable type.
var myString = NewJavaObject("java.lang.String", ["myString"]);
//…..
var outputString = String(myString);
delete myString;
If the variable is returned from an invocation of a function or call, you must delete that object as well.