Hi all,
I would like to use the headless client to run in background some tasks.
To start, I’m triyng to run this:
Into the globals scope of my solution “main” I have this two methods:
function test(i) {
plugins.file.createFile("C:\\goofie.txt")
plugins.file.createFile("C:\\"+i+".txt")
}
function callBack(i){
application.output("done")
}
Into a form method I call this code:
var _client
for(var i=0;i<10;i++){
_client = plugins.headlessclient.createClient("main","user","userpass",null)
_client.queueMethod(null,"test",[i],globals.callBack)
}
I’m expecting that the headless client will create the txt file but it doesn’t.
Another thing is that the callback methods are called all together when also the last client has run the method. instead one by one (when the method execution is done).
Does exist a way to debug the queueMethod into the developer? The queueMethod I’m calling, is part of the solution from I’m running the code (so “main”)
Am I missing something?
Thanks