Hello,

I designed a validation process using the GPD and I want to use it in my seam 
app.
I lack example of assignment to any other actor than the logged in user so I'm 
asking here.

When I log my user in, I set the built-in Actor component to the user id.
The user creates a document an sed it ot his superior for validation.
So I created a task node, with assignment to #{actor.id}, and I made something 
like this:


  |     @StartTask
  |     @EndTask(transition="demandeValidationNPlusUn")
  |     public void demandeValidationNPlusUn(){         
  |             
  |             //Look for superior in database
  |             Valideur valideur1 = (Valideur)em.createQuery("select valideur 
from Valideur valideur where typeValidation=:typeValidation")
  |             .setParameter("typeValidation", "Valideur1")
  |             .getSingleResult();
  |             
  |             
actor.setId(""+valideur1.getCollaborateur().getCollaborateurId());
  |             
  |             
certificationHome.setCertificationCertificationId(this.certificationId.intValue());
  |             Certification certifTest =certificationHome.find();
  |             
  |             certificationHome.getInstance().setStatut("Attente de 
Validation");
  |             certificationHome.persist();
  |             this.statut = certificationHome.getInstance().getStatut();
  |     }
  | 

Let me explain (there's a bit of french, could be confusing btw).
I fetch the superior from the database and put his id in the Actor component, 
then modify the object, status, save, etc ...

The transition is ok, assigned to the superior but the actor component is 
changed is this method !
So when I display back my #{taskInstanceList} datatable, the list displayed is 
the superior one.
I have to log out / log in to reset the actor to my logged user and have a 
correct taskInstanceList.

I'm sure I'm not using the actor or @StartTask/@EndTask the way it should be 
but I can't find an example of assignment to another actor.

Can anybody please help me ? (or tell me where I can find an example)

Thank you

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052587
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to