[jboss-user] [jBPM] - KnowledgeSession issues and best practice

David Boyd do-not-reply at jboss.com
Mon May 14 08:10:25 EDT 2012


David Boyd [https://community.jboss.org/people/dboyd68] created the discussion

"KnowledgeSession issues and best practice"

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

--------------------------------------------------------------
Hey All,

I have an interesting scenario that I would like to advice on.

I am new to JBPM so appoligies if this is a silly question.

*
*
My Scenario is this

I have a number of knowledge sessions in Stateless sessions beans. (So not one knolwedge session per request and not a singleton knowledgesession either... understand this is a bad design but stick with me)

The last step in this "fails"


signal event (workflow 1)
     within server task execute inner step
 Inner Step          
          start  new process (workflow 2)
              raise seam event 
             catch seam event (somewhere else)
                   siginal event to move workflow 2 along.


My problem is in the last step. Workflow 2 is started but it is never moved i.e. singal event seems to have no effect. Debugging  the code it appears that the internal process instance has the wrong nodes and doesn't actually fire execute anything (no excpetions are raised though) 

Attempted solutions.
1) I attempted to add a  flush() on the entity manager associated  with JBPM at ever step. Figured it might be multiple knowledge sessions who haven't flushed data yet. However this didn't help.

2) Make one knowledge session shared by every stateless session bean. This seems to solve the issue but I don't understand why this would work and flush wouldn't.

I am using CMP within a J2EE environment on JBPM 5.1 on JBoss 4.2


Can anyone shed some light on why this might occur? Or if a singleton knowledge session is a valid design?
--------------------------------------------------------------

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

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/20120514/8ba4cb0f/attachment-0001.html 


More information about the jboss-user mailing list