[jboss-user] [JBoss jBPM] - Strange instances

Vorsorge do-not-reply at jboss.com
Mon Sep 24 04:04:14 EDT 2007


I found some strange instances of ActionHandlers. 

We wrote our own sub process handler. We needed more control over the communication between parent and child and over the embedding of the child into the parent.

For testing purposes I tried to let our sub process node as part of process A call process A again. This is a recursive call which we will not allow and there will be checks against.

This is the situation. 

Let AP be the parent process instance and AC the child instance.

We create the AC like this:

  | JbpmContext jbpmContext =executionContextOfAP.getJbpmContext()
  | GraphSession graphSession = jbpmContext.getGraphSession();
  | List processDefinitions = graphSession.findAllProcessDefinitions();
  | <... Looking for process by the name of AP ... >
  | ProcessInstance processInstanceOfAC = processDefinitionOfAC.createProcessInstance();

When ok, we start processInstanceOfAC with

  | processInstanceOfAC.signal();

This causes an Exception of a type I didn't expect in  I OUR code. Looking for the reason I found:

processDefinitionOfAP and processDefinitionOfAC are different instances of ProcessInstance. That's ok and what I expected.
But the instances of the used ActionHandlers are the same. So parent and child use the same instance of ActionHandler. (Which causes our code to crash.)

My questions:
1. Is this behaviour deliberate?
2. If yes, then why?
3. We are using Jbpm 3.1.2. Is it the same in 3.2?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087757#4087757

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4087757

More information about the jboss-user mailing list