Submit a task with Promptsets via JavaAPI (Application Interface) in AE v9 and v10

Document ID : KB000089102
Last Modified Date : 14/04/2018
Show Technical Document Details
Affects Release version(s): null

Submit a task with Promptsets via JavaAPI (Application Interface) in AE v9 and v10

Question: How to execute an object with promptset via Java api (Application Interface) in AE v9 and v10?


Executinga job or a workflow with Prompset via Java api is not the same with AE v9 and v10

In v10, there isa new function called "putPromptBuffer"in class "ExecuteObject". With this function, the value of each prompsetvariable could be stored in the buffer before executing the object thatcontains the prompsets. So the steps to execute an object with promptsets are:

  1. - Initiate the executable object
  2. - Put the promptsets'value to the buffer
  3. - Execute the object.



//Step 1: initiate the executable object

ExecuteObject exec = newExecuteObject(new UC4ObjectName("GEN.SCRI_PROMPT_DEMO"));

//Step 2: Put the promptset's values to the buffer





//Ste 3: Execute the object


In v9, there's no similar function to "putPrompBuffer" as inv10. The approach is:

  1. - Initiate and execute the object
  2. - Wait until the prompt is notified via the callback function
  3. - Fill the promptsets' value after the workflow isstarted.



//Inthe main flow:

waitForPrompt = newCountDownLatch(1);

ExecuteObject exec = newExecuteObject(new UC4ObjectName("GEN.SCRI_PROMPT_DEMO"));

uc4.sendRequest(exec, this);


SubmitPrompt submit = newSubmitPrompt(names, promptSets.toArray(newTaskPromptSetContent[promptSets.size()]));

uc4.sendRequestAndWait (submit);

//Overwritethe call back functions of the DefaultNotificationListener to count down the countdownlatch

public void promptInputRequired(intrun) {



public voidhandleIOException(IOException e) {