[jboss-user] [JBoss Seam] - Re: Business process variables duplicted when updated.

aggtecnologia do-not-reply at jboss.com
Sat Jun 16 18:09:43 EDT 2007


Thank you Gavin for your PROMPT (yes in capitals :-) ) response.

I would like to verify if I am interpreting the right way what´s going on. Here is a snippet from  my code:

@Stateful
@Name("verifyData")
public class verificarDatosBean implements verificarDatos {

	@In
	@Out(scope=ScopeType.BUSINESS_PROCESS, required=false)

	@EndTask
	public String saveModifiedData() {        
		return "/home.seam";
	}
		
	@Remove @Destroy public void destroy(){}

	public String getUnDato() {		
		return unDato;
	}

	public void setUnDato(String unDato) {
		this.unDato = unDato;
	}

}

1. When seam finds:

     @In
    private String unDato; 

injects the the BUSSINESS_PROCESS variable unDato. (The variable was already created elsewere with BUSSINESS_PROCESS scope AND I already called a method annotated with @StartTask, so I am inside a BUSSINESS_PROCESS)

2. As soon as any method inside the object is executed (I think in my case it is the getter because this EJB is acting as a Backing Bean) Seams finds:

    private String unDato; 
    @Out(scope=ScopeType.BUSINESS_PROCESS, required=false)

and creates the new variable with the same name (unDato) and scope (unDato) but with different Id.

3. When I execute:

        @EndTask
	public String saveModifiedData()

Seam sees that the task is completed and updates the original variable.

Forgive my verbosity but I want to be sure I am conceptually right. (So I learn once for good)

 Claudio





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

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




More information about the jboss-user mailing list