AnsweredAssumed Answered

Execute or Restart a JOB with a Promptset using the JAVA code API

Question asked by SamahSohrab607228 on Mar 9, 2015
Latest reply on Sep 11, 2015 by SamahSohrab607228
Hi,

I'm using the JAVA API (uc4.jar) to create some basic scripts. I'm trying to Execute or Restart a job. All my jobs have at least 1 Promptset which I use for different templates, and notifications.

In my Java Code, I'm able to Initiate the RESTART (or Execute), but I can't get it to go further than that, because the System is "Waiting for User Input" which is a click of DONE on the PromptSet pop-up.

Does anyone have an idea on how I can click Done, automatically? In the Documentation, there is a Java class SubmitPrompt, but I don't believe this is a correct method.

Here is my code so far, which works great for objects without a promptset, if I use the function sendRequestAndWait my code doesn't return until I click Done on the Promptset Pop-up.
RestartTask reStart = new RestartTask(runID)
try {
    connUC4.sendRequest(reStart,null);
} catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

Outcomes