[jboss-user] [JBoss Seam] - Business process injection doesn't work in a Seam component

chawax do-not-reply at jboss.com
Fri Sep 28 05:03:17 EDT 2007


Hi,

I have a problem using JBpm with Seam.
I modeled a process with nodes and binded actions to these nodes. But the injection of business process variables or processInstance in Seam component does not work when running these actions. I don't have the problem if the token did not go through a task-node before (ie a business process with no human action). I guess it deals with a context problem, but I can't understand what the problem exactly is.

For example, I modeled my node this way :

<node name="Acceptation">
  | 	<transition to="End" />
  | 	<action expression="#{demandeAbsenceAction.demandeAcceptee}" />
  | </node>

I have a first Seam component (conversation scope) which creates the process instance this way :

@org.jboss.seam.annotations.bpm.CreateProcess(definition = "validationDemandeAbsence")
  | @org.jboss.seam.annotations.End
  | public void valider()
  | {}

It also outjects idDemandeAbsence variable in the business process :

@org.jboss.seam.annotations.Out(required = false, scope = org.jboss.seam.ScopeType.BUSINESS_PROCESS)
  | protected java.lang.Long idDemandeAbsence;

I had a look in the JBPM tables and this outjection works well.

I have another Seam component (conversation scope too) which contains methods binded to JPDL nodes. It injects processInstance and idDemandeAbsence variables this way :

@org.jboss.seam.annotations.In(create = true)
  | protected org.jbpm.graph.exe.ProcessInstance processInstance;
  | 
  | @org.jboss.seam.annotations.In(value = "idDemandeAbsence",  scope = org.jboss.seam.ScopeType.BUSINESS_PROCESS)
  | protected java.lang.Long idDemandeAbsence;

And of course it declares the action method binded to JPDL node (no annotation on this method, should there be some ?) :

public void demandeAcceptee()
  | {}

But idDemandeAbsence and processInstance variables are alway null. Do I use JBpm and Seam the right way ? I work on this problem for several days, so any help will be greatly appreciated ;)

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

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



More information about the jboss-user mailing list