I may missing one last thing. It may sound dull, but I've been asking myself 
and couldn't find any cleaner solution than the one I'm finally using.
So here it is : 
When I was using the default ExpressionAssignmentHandler, I used to pass it an 
Expression. (Well nothing stunning until now). This expression was some kind of 
clue to which actor was finally getting the task.

Now, I'm using my own AssignmentHandler, but it seems like the only possibility 
to pass it a clue to which user (or group) is actually getting the task is by 
using variables. So I end up writing something like this : 

In the class that creates a new process instance : 

  | HashMap<String,Object> variables = new HashMap<String,Object>();
  | variables.put(contractID, "" + contractID);
  | variables.put("group", "control-attendants");
  | 

In the AssignmentHandler : 

  | String group = (String)executioncontext.getVariable("group");
  | assignable.setPooledActors(group);
  | 

It's working, but I hate it. It ties the process definition to my code : the 
group name is completly resolved in the code. 
Is there any other way in the process definition to define a variable that I 
would get as a clue in my AssignmentHandler ?
Or even a cleaner solution that you would think of ?

Thanks for your time and opinion.

Cheers,

Jerome

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

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

Reply via email to