JBoss Community

Re: Mina Human Task Server and close connections - don't refresh the session

created by gardellajp in jBPM - View the full discussion

Hi,

 

Any can help me with this? I'm starting with jBPM and I believe that is a simple problem that someone resolved. I suppose is not clear my problem, I try write in other way:

 

1) I'm using jbpm inside my app, so I'm not using jbpm-console. The app have some screens where show task and interact with them. Some of these task are member of process and other not.

2) When I complete a task I that is member of a process, I do:

    a. Load a session that contain the process instance of the task.

    b. Complete the task via TaskClient API. I using Apache Mina as Human Task Service.

    c. Atach logger to the session to listen nodes activation. If a node is Human Task Node, update the database. So I insert new tasks in App database.

    d. Close session and loggers.

 

My problem is in point d. If I complete the task and next close session and logger, the CommandBasedWSHumanTaskHandler attach to the session not update it becouse the session is closed. A workaround that I've found is before close session sleep the thread a second. So Apache Mina notify the creation of task and the handler (CommandBasedWSHumanTaskHandler) can update session state.

 

Is a poor solution, but I couldn't found an alternative. I try keep session open in a pool, but when I retry to use have problems like:

[ERROR] Participating in existing JTA transaction, but no JTA TransactionManager or TransactionSychronizationRegistry available:

 

Can someone give some links or tips to fix it?

 

Thanks

Reply to this message by going to Community

Start a new discussion in jBPM at Community