[jboss-user] [JBoss Seam] - jboss seam bijection problem

talekar do-not-reply at jboss.com
Mon Jul 23 16:18:17 EDT 2007


jboss seam 1.2.1

I am having trouble understanding how bijection work with jbpm. Here is a simple jpdl: 


  | <process-definition  name="MyWorkflow">
  | 
  | 	<start-state name="start">
  | 		<transition to="decide"></transition>
  | 	</start-state>
  | 
  | 	<decision name="decide" expression="#{myManager.result}">
  | 		<transition to="assigntask" name="assigntask"></transition>
  | 		<transition to="end" name="end"></transition>
  | 	</decision>
  | 
  | 	<task-node name="assigntask">
  | 		<task name="Evaluate">
  | 			<assignment actor-id="adminuser"></assignment>
  | 		</task>
  | 		<transition to="end" name="cancel"></transition>
  | 		<transition to="decide" name="retry"></transition>
  | 	</task-node>
  | 
  | 	<end-state name="end"></end-state>
  | 
  | </process-definition>
  | 

Notice that the decision task calls #{myManager.decide} which a SFSB:

  | @Stateful
  | @Name ("myManager")
  | public class MyManagerImpl implements MyManager,
  | 		Serializable {
  | 
  | 	private static final long serialVersionUID = 1L;
  | 
  | 	@Logger
  | 	private Log LOG;
  | 
  | 	@PersistenceContext (type = PersistenceContextType.EXTENDED)
  | 	private EntityManager entityManager;
  | 
  | 	@In (required = false)
  | 	@Out (scope = BUSINESS_PROCESS, required = true)
  | 	private Long id;
  | 
  | 	@CreateProcess(definition = "MyWorkflow")
  | 	public void begin() {
  | 		id = new Long(10);
  | 	}
  | 
  | 	public String getResult() {
  | 		// NPE :-(
  | 		// why doesnt id get injected?
  | 		int x = id.intValue(); 
  | 	}
  | 
  | 	@Remove
  | 	@Destroy
  | 	public void destroy() {
  | 	}
  | }
  | 

I get a NPE in getResult() when it is called by jBPM. How come id never gets injected back?

I set logging to TRACE on org.jboss.seam.Component and I get the "injecting dependencies of" message when begin() is called. But I DONT see the same messages when the jBPM task node executes the getResult() expression.

Am I missing something in a config file?

Thanks in advance.

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

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



More information about the jboss-user mailing list