Andy Yeung [
http://community.jboss.org/people/andy.yeung] created the discussion
"Dispose of knowledgeSession when use with persistence"
To view the discussion, visit:
http://community.jboss.org/message/634738#634738
--------------------------------------------------------------
We are trying to use JBPM 5 with persistence to handle long workflow involving human task.
I have read some other dicussion in the forum and they suggest to use 1 session for each
workflow while having a single session to handle all schedule task. Session is
reinitialize when handling user response like complete task such that workflow will not
stucked and continue to subsequent nodes. The problem comes when the task complete.
| | | | BlockingTaskOperationResponseHandler responseHandler = new
BlockingTaskOperationResponseHandler(); |
| | | | getTaskClient().complete(pTaskId, pUserId, contentData, responseHandler); |
| | | | responseHandler.waitTillDone(10000); |
| | | | knowledgeSession.dispose(); |
I found that responseHandler.waitTillDone already jump out when the complete msg
successfully sent to task server.
It doesn't wait until the CommandBasedWSHumanTaskHandler task completed event to be
executed.
This make the session closed and the jbpm app scope transaction manager being released and
cause the transitted workflow state in CommandBasedWSHumanTaskHandler cannot be
persisted.
I want to know if it's just my usage or configuration problem. It seems it require me
to modify the CommandBasedWSHumanTaskHandler and let my code above to wait until
CommandBasedWSHumanTaskHandler.TaskCompletedHandler to finish its job first before I
dispose the session.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/634738#634738]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]