Hi,
I am trying to call a server method asynchronously in my TBO. Therefore I set the option "Run Asynchronously" in DAB when I created the method.
In my code I do the following:
IDfList argsList = new DfList();
argsList.insertString(0, "METHOD");
argsList.insertString(1, "SAVE_RESULTS");
argsList.insertString(2, "ARGUMENTS");
argsList.insertString(3, "LAUNCH_ASYNC");
argsList.insertString(4, "RUN_AS_SERVER");
IDfList argsTypes = new DfList();
argsTypes.insertString(0, "S");
argsTypes.insertString(1, "B");
argsTypes.insertString(2, "S");
argsTypes.insertString(3, "B");
argsTypes.insertString(4, "B");
IDfList argsValues = new DfList();
argsValues.insertString(0, "");
argsValues.insertString(1, "T");
argsValues.insertString(2, "'-docbase_name " + Const.DOCBASE
+ " -user_name " + Const.SUPERUSER + " -ticket " + Const.PASS
+ " -object_id " + this.getObjectId() + "'");
argsValues.insertString(3, "T");
argsValues.insertString(4, "T");
System.out.println("executeMethod...");
getSession().apply(null, "DO_METHOD", argsList, argsTypes, argsValues);
System.out.println("finished!");
But the Method always runs synchronously. I can see it in the logs, the System.out.println("finished") gets called after the server method is complete
What am I doing wrong?? Please help! Thank you.