/**
* Call the CentralDispatcherMgr to submit the execution params to the central dispatch queue instead of executing
* locally.
*/
private void queueAction() {
final QueuedItemResult result;
try {
if (inlineScript && null == inlineScriptContent) {
//pass input stream as the script stream so that the Queue action can serialize it for the remote
// request
setScriptAsStream(instream);
}
result = framework.getCentralDispatcherMgr().queueDispatcherScript(this);
} catch (CentralDispatcherException e) {
throw new CoreException("Unable to queue the execution: " + e.getMessage(), e);
}
if (null == result || !result.isSuccessful()) {
throw new CoreException(
"Queued job request failed: " + (null != result ? result.getMessage() : "Result was null"));
}
if (null != result.getMessage()) {
out.println(result.getMessage());
}
out.println("Queued Execution ID: " + result.getItem().getId() + " <" + result.getItem().getUrl() + ">");
if (argFollow) {
followOutput(result.getItem(), argQuiet, argProgress);
}
}