Gareth Edwards
2013-01-03 16:23:16 UTC
Gareth Edwards [https://community.jboss.org/people/garethed] created the discussion
"Process Session ID always 0 in database"
To view the discussion, visit: https://community.jboss.org/message/787380#787380
--------------------------------------------------------------
Hello,
I am starting a jbpm process using the following code:
                   KnowledgeBase kbase = readKnowledgeBase();Â
                   StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
                   AsyncHornetQHTWorkItemHandler workItemHandler = new AsyncHornetQHTWorkItemHandler(ksession);
                   workItemHandler.setIpAddress("10.0.0.101");
                   ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler);
                   Map<String, Object> params = new HashMap<String, Object>();
                   params.put("employee", "krisv");
                   ksession.startProcess("defaultPackage.YesNo",params);
The first time through the process works fine.
Running the process again seems to log the results from the previous run through and throws an exception.
8   03/01 16:13:41,694[Thread-1] ERROR service.hornetq.HornetQTaskClientConnector.run - Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5153
java.lang.ClassCastException: org.jbpm.process.workitem.wsht.AsyncGenericHTWorkItemHandler$TaskAddedHandler cannot be cast to org.jbpm.task.service.TaskClientHandler$GetTaskResponseHandler
         at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:75)
         at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56)
         at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:122)
         at java.lang.Thread.run(Thread.java:722)
Verified
Verified:true
If I drop the jbpm5 schema and recreate it then it works fine again.
"Process Session ID always 0 in database"
To view the discussion, visit: https://community.jboss.org/message/787380#787380
--------------------------------------------------------------
Hello,
I am starting a jbpm process using the following code:
                   KnowledgeBase kbase = readKnowledgeBase();Â
                   StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
                   AsyncHornetQHTWorkItemHandler workItemHandler = new AsyncHornetQHTWorkItemHandler(ksession);
                   workItemHandler.setIpAddress("10.0.0.101");
                   ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler);
                   Map<String, Object> params = new HashMap<String, Object>();
                   params.put("employee", "krisv");
                   ksession.startProcess("defaultPackage.YesNo",params);
The first time through the process works fine.
Running the process again seems to log the results from the previous run through and throws an exception.
8   03/01 16:13:41,694[Thread-1] ERROR service.hornetq.HornetQTaskClientConnector.run - Client Exception with class class org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1 using port 5153
java.lang.ClassCastException: org.jbpm.process.workitem.wsht.AsyncGenericHTWorkItemHandler$TaskAddedHandler cannot be cast to org.jbpm.task.service.TaskClientHandler$GetTaskResponseHandler
         at org.jbpm.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:75)
         at org.jbpm.task.service.hornetq.HornetQTaskClientHandler.messageReceived(HornetQTaskClientHandler.java:56)
         at org.jbpm.task.service.hornetq.HornetQTaskClientConnector$1.run(HornetQTaskClientConnector.java:122)
         at java.lang.Thread.run(Thread.java:722)
Verified
Verified:true
If I drop the jbpm5 schema and recreate it then it works fine again.