[jboss-dev-forums] [jBPM Development] - Problem to start two instances of the same process

cip80 do-not-reply at jboss.com
Fri Jul 13 14:10:43 EDT 2012


cip80 [https://community.jboss.org/people/cip80] created the discussion

"Problem to start two instances of the same process"

To view the discussion, visit: https://community.jboss.org/message/748094#748094

--------------------------------------------------------------
hi,
can someone help me?
I'm trying to start two instances of the same process.
First instance is started correctly, but the second I get this error.

2012-07-13 20:09:04,301 INFO  org.jbpm.task.service.hornetq.HornetQTaskClientConnector.createClientQueue:171 - Queue SyncHornetQHTWorkItemHandler already exists
2012-07-13 19:27:29,223 ERROR org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem:181 - Fri Jul 13 19:27:29 CEST 2012: Error when creating task on task server for work item id 1. Error reported by task server: Task operation request timed out
java.lang.RuntimeException: Task operation request timed out
          at org.jbpm.task.service.SyncTaskServiceWrapper.addTask(SyncTaskServiceWrapper.java:118)
          at org.jbpm.process.workitem.wsht.GenericHTWorkItemHandler.executeWorkItem(GenericHTWorkItemHandler.java:167)
          at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)
          at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)


Both, however, are stored correctly in db.



| 
 | KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); | 
 | 
 |
| 
 | kbuilder.add(ResourceFactory.newClassPathResource("Evaluation.bpmn"), ResourceType.BPMN2);  | 
 | 
 |
| 
 | KnowledgeBase kbase =kbuilder.newKnowledgeBase(); | 
 | 
 |
| 
 | StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); | 
 | 
 |
| 
 | 
 | 
 | 
 |
| 
 | HornetQHTWorkItemHandler humanTaskHandler = new HornetQHTWorkItemHandler(ksession); | 
 | 
 |
| 
 | humanTaskHandler.setIpAddress("127.0.0.1"); | 
 | 
 |
| 
 | humanTaskHandler.setPort(5445); | 
 | 
 |
| 
 | ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler); | 
 | 
 |
| 
 | 
 | 
 | 
 |
| 
 | 
 | 
 | 
 |
| 
 | Map<String, Object> params = new HashMap<String, Object>(); | 
 | 
 |
| 
 | params.put("employee", "krisv"); | 
 | 
 |
| 
 | params.put("reason", "Yearly performance evaluation"); | 
 | 
 |


| 
 | ksession.startProcess("com.sample.evaluation", params); |
| 
 | ksession.dispose(); |
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120713/a4560fd2/attachment.html 


More information about the jboss-dev-forums mailing list