[jboss-user] [jBPM] - Re: Growing NioProcessor Thread Number in Human Tasks

Sandip Bhoi do-not-reply at jboss.com
Fri Nov 25 12:16:22 EST 2011


Sandip Bhoi [http://community.jboss.org/people/sandip.bhoi] created the discussion

"Re: Growing NioProcessor Thread Number in Human Tasks"

To view the discussion, visit: http://community.jboss.org/message/638400#638400

--------------------------------------------------------------
Thanks its passing further but stucked at taskSummaryHandler.getResults()

// krisv is Product Planner
    public static List<TaskSummary> getTaskDetails(String userName) {
        List<TaskSummary> task1 = null;
        try {
            SystemEventListenerFactory.setSystemEventListener(new SystemEventListener());
            TaskClient taskClient = createTaskClient();
            // "krisv" executes
            BlockingTaskSummaryResponseHandler taskSummaryHandler = new BlockingTaskSummaryResponseHandler();
            taskClient.getTasksAssignedAsPotentialOwner(userName, "en-UK", taskSummaryHandler);
            if (taskSummaryHandler != null && taskSummaryHandler.getResults() != null
                    && taskSummaryHandler.getResults().size() > 0) {
                // task1 = taskSummaryHandler.getResults().get(0);
                task1 = taskSummaryHandler.getResults();
            }
            System.out.println("ProcessTest.getTaskDetails() task1:" + task1);

            System.out.println("ProcessTest.getTaskDetails() ksession:" + ksession);

        } catch (Exception e) {
            System.out.println("ProcessTest.getTaskDetails()() Exception");
            e.printStackTrace();
        }

        return task1;
    }

public List<TaskSummary> getResults() {
        // note that this method doesn't need to be synced because if waitTillDone returns true,
        // it means results is available 
        boolean done = waitTillDone(RESULTS_WAIT_TIME);

        if (!done) {
throw new RuntimeException("Timeout : unable to retrieve results");
        }

        return results;
    }




Exception in thread "Thread-21" java.lang.RuntimeException: Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5445
    at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:115)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler$TaskCompletedHandler cannot be cast to org.jbpm.task.service.TaskClientHandler$TaskSummaryResponseHandler
    at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:171)
    at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:55)
    at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:104)
    ... 1 more
ProcessTest.getTaskDetails()() Exception
java.lang.RuntimeException: Timeout : unable to retrieve results
    at org.jbpm.task.service.responsehandlers.BlockingTaskSummaryResponseHandler.getResults(BlockingTaskSummaryResponseHandler.java:41)
    at com.sample.servlet.TaskWorkUtil.getTaskDetails(TaskWorkUtil.java:123)
    at com.sample.servlet.OrderFactoryServlet.execute(OrderFactoryServlet.java:119)
    at com.sample.servlet.OrderFactoryServlet.doGet(OrderFactoryServlet.java:41)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:297)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:317)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:204)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:311)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 :(  :(  :( 
 http://community.jboss.org/servlet/JiveServlet/showImage/2-638400-17362/ClassCastException.JPG  http://community.jboss.org/servlet/JiveServlet/downloadImage/2-638400-17362/450-236/ClassCastException.JPG
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/638400#638400]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111125/b51a141f/attachment.html 


More information about the jboss-user mailing list