AnsweredAssumed Answered

Anyone have experience using the java API to execute jobs with prompt sets?

Question asked by JessicaIsaacson603938 on Jul 23, 2014
Latest reply on Dec 22, 2015 by Steven_Nguyen_130

Our developer has been getting inconsistent results. Sometimes his job (which contains a prompt set) is getting executed fine, but sometimes it ends up staying in the Activities window in "waiting for user input" status. 

It seems to be a completely intermittent problem, comes and goes without changes to the code or parameters. Happens in both Dev and Prod. I'll open a support ticket if nobody here has ideas...

Java is completely greek to me, but here's the snipped he offered.

uc4Connection.addNotificationListener(this);
       
       ExecuteObject exec = new ExecuteObject(new UC4ObjectName("SERECBAT_SELLER_EXIT_RECOMMENDATION"));
       uc4Connection.sendRequest(exec, this);
       waitForPrompt.await();
                System.out.println("RunID:"+runID.get());
                //wait for prompt kick
                TaskPromptSetNames names = new TaskPromptSetNames(runID.get());
                send(names);
                List<TaskPromptSetContent> promptSets = new ArrayList<TaskPromptSetContent>();

And here's an error he's seeing (I'm not sure when this arises, but if anyone engages, I'll get Srini on the forum himself to elaborate!):

INFO   | jvm 1    | 2014/07/22 18:36:16 | java.lang.RuntimeException: This task is not yet active or not active anymore.
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at com.ebay.app.raptor.segmttool.service.JobExecutionServiceImpl.send(JobExecutionServiceImpl.java:138)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at com.ebay.app.raptor.segmttool.service.JobExecutionServiceImpl.executeScript(JobExecutionServiceImpl.java:83)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at com.ebay.app.raptor.segmttool.service.JobExecutionServiceImpl.invokeJob(JobExecutionServiceImpl.java:67)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at com.ebay.app.raptor.segmttool.controller.SegmentationToolController.recalculate(SegmentationToolController.java:41)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at java.lang.reflect.Method.invoke(Method.java:602)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
INFO   | jvm 1    | 2014/07/22 18:36:16 |     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)

 

Outcomes