Answered
getActiveInstances
Hello,
I'm trying to create an application system based on FMIS, and my basic model involves having multiple instances of one application running, and managing those instances with another application. I believe that I can implement my management with appropriately configured .asc files and NetConnection objects, but I want the application instances to be dynamically named, and to retrieve these instances in real time from the server. Based on my reading of the Administration API Reference, it seems that the getActiveInstances function should fulfill this need. However, I'm having trouble getting it to work. I've tried to implement it this way:
var objResult = new Object();
objResult.onResult = function() {
/*trace("Result :" + this.toString());
for (var obj in this) {
trace(obj + " = " + this[obj]);
}*/
trace("Results :" + this.data);
}
objResult.onStatus = function() {
/*trace("Status :" + this.toString());
for (var obj in this) {
trace(obj + " = " + this[obj]);
}*/
trace("Status :" + this.data);
}
nc.call("getActiveInstances", objResult);
In the above, nc is a NetConnection object that is successfully connecting to my admin server. The commented out code in my onResult and onStatus handlers worked, but showed no array of string names of application instances. The data property of the objResult object is coming back undefined.
I'd like to find an example of how to successfully implement this concept. I'm not married to the use of getActiveInstances, although I would like to be able to dynamically query the server and retrieve the currently running applications on FMIS. Thanks in advance for any assistance.
I'm trying to create an application system based on FMIS, and my basic model involves having multiple instances of one application running, and managing those instances with another application. I believe that I can implement my management with appropriately configured .asc files and NetConnection objects, but I want the application instances to be dynamically named, and to retrieve these instances in real time from the server. Based on my reading of the Administration API Reference, it seems that the getActiveInstances function should fulfill this need. However, I'm having trouble getting it to work. I've tried to implement it this way:
var objResult = new Object();
objResult.onResult = function() {
/*trace("Result :" + this.toString());
for (var obj in this) {
trace(obj + " = " + this[obj]);
}*/
trace("Results :" + this.data);
}
objResult.onStatus = function() {
/*trace("Status :" + this.toString());
for (var obj in this) {
trace(obj + " = " + this[obj]);
}*/
trace("Status :" + this.data);
}
nc.call("getActiveInstances", objResult);
In the above, nc is a NetConnection object that is successfully connecting to my admin server. The commented out code in my onResult and onStatus handlers worked, but showed no array of string names of application instances. The data property of the objResult object is coming back undefined.
I'd like to find an example of how to successfully implement this concept. I'm not married to the use of getActiveInstances, although I would like to be able to dynamically query the server and retrieve the currently running applications on FMIS. Thanks in advance for any assistance.
