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

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


Hi all!
I am trying to update JBPM business process variables using Seam annotations.
I noticed the following behavior:

When I use:
	@In
	@Out
	private String unDato;

my class retrieves the variable but the modifications do not get persisted when I call the @EndTask annotated function (the last one before destroying the class)

When I use:
	@In
	@Out(scope=ScopeType.BUSINESS_PROCESS, required=false)
	private String unDato;

my class also retrieves the variables but as soon as the class gets created a new variable with the same name (unDato) and value is created in the database (jbpm_variableinstance). When I leave the class and finish the task, The old variable is updated correctly but the new "ghost" variable remains in the DB (with the original value).

I found a workaround by updating variables "by hand": instead of using @Out I use:

Contexts.getBusinessProcessContext().set("unDato", unDato);

This way I do what I need: just modify the content of the original value.

Im I doing something wrong in the way I am trying to use annotations?

Thanks in advance,

Claudio




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

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



More information about the jboss-user mailing list