[jboss-user] [jBPM] - Process Session ID always 0 in database

Gareth Edwards do-not-reply at jboss.com
Thu Jan 3 11:23:16 EST 2013


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.
>From looking in the task table I see that the processsessionid is always 0.
I'm using postgres as my database but I don't think that is the problem.

I am creating the session on a different machine to the server that is running jBoss for development purposes if that makes a difference.
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://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/20130103/89532b8c/attachment.html 


More information about the jboss-user mailing list