[jboss-user] [jBPM] - Re: Problem with multiple sessions
Gareth Edwards
do-not-reply at jboss.com
Sun Apr 7 13:05:29 EDT 2013
Gareth Edwards [https://community.jboss.org/people/garethed] created the discussion
"Re: Problem with multiple sessions"
To view the discussion, visit: https://community.jboss.org/message/806908#806908
--------------------------------------------------------------
I have tidied up the code and removed any thing that I think might be causing the issue.
The WorkflowCurrentTaskHandler is now not really doing anything as an experiment.
also the WorkflowEventListener is just logging the node name.
I'm still getting the same behavior.
public void startWorkFlow(boolean startProcess, final User user) {
this.completed = false;
JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);
String connectorName = "Hornet" + UUID.randomUUID().toString();
final AsyncHornetQHTWorkItemHandler humanTaskHandler = new AsyncHornetQHTWorkItemHandler(new AsyncHornetQTaskClient(connectorName), ksession, OnErrorAction.LOG);
humanTaskHandler.setIpAddress(ipAddress);
humanTaskHandler.setOwningSessionOnly(true);
final CMTDisposeCommand dc = new CMTDisposeCommand();
dc.setWorkitemhandler(humanTaskHandler);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", humanTaskHandler);
ksession.getWorkItemManager().registerWorkItemHandler("UpdateWorkflowCurrentTask", new WorkflowCurrentTaskHandler(null, ksession.getId(), null));
ksession.addEventListener(new WorkflowEventListener(null, ksession.getId(), null));
ksession.addEventListener(new DefaultProcessEventListener(){
@Override
public void afterProcessCompleted(ProcessCompletedEvent event){
log.info("~~~~~~~~~Workflow Session:" + ksession.getId() + " Completed~~~~~~~~~");
log.info("Disposing of " + event.getProcessInstance().getProcessName() + "!");
ksession.execute(dc);
completed = true;
workflowSettings.setCompleted(true);
}
});
if (startProcess)
ksession.startProcess(workflowSettings.getWorkflowName(),workflowSettings.getWorkFlowData());
}
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/806908#806908]
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/20130407/b9da7159/attachment.html
More information about the jboss-user
mailing list