-
1. Re: Dynamic Group / PooledActors
kukeltje Apr 1, 2009 6:16 AM (in response to claym)Yes, by putting the group name in the pooled actors and before you query the pooled tasks, decide what groups your specific users is in and add that groupname to the list.
And 'yes' they are interchangeable, technically. For the list that is passed to the pooled actors query they are all just strings -
2. Re: Dynamic Group / PooledActors
claym Apr 1, 2009 7:40 AM (in response to claym)Would that be done by assigning the task to "group(foo)"?
-
3. Re: Dynamic Group / PooledActors
kukeltje Apr 1, 2009 9:11 AM (in response to claym)via an expression? Not sure, never used them since they are related to the jBPM identity model which I never used. If the docs are not clear (which thwey might not in this area) looking at the source is the easiest to see what is going on.
-
4. Re: Dynamic Group / PooledActors
claym Apr 1, 2009 11:02 AM (in response to claym)yeah, the identity side of things lacks docs pretty badly. i'd kill for more examples.
how else would you assign something to a group other than "group(foo)" ? -
5. Re: Dynamic Group / PooledActors
kukeltje Apr 1, 2009 11:49 AM (in response to claym)by setting the pooledactors to "foo" and before displaying the group tasklist get all the groupnames the actor is member of and feed that to the method (as mentioned in several other posts the last days)
-
6. Re: Dynamic Group / PooledActors
claym Apr 1, 2009 2:58 PM (in response to claym)I think the problem is that the user might not even be defined when I assign the task to the pool.
Everything I've seen says once the task is assigned to a actor/pool, that list stays static.
Do I have that completely wrong? -
7. Re: Dynamic Group / PooledActors
kukeltje Apr 1, 2009 4:59 PM (in response to claym)ASSIGN THE GROUPNAME to the pooled actors, not ALL INDIVIDUAL ACTORS.... if you know you use it this way you can lookup pooled tasks by the groups the user belongs to...
-
8. Re: Dynamic Group / PooledActors
claym Apr 2, 2009 11:05 AM (in response to claym)I don't want to query by the group, I want to query by a user who wasn't part of the group when the group was assigned to the task.
Anyway, I'll give it a shot.
One thing I'm not sure about - you can set the group(foo) expression in the workflow definition, but can you do it programmatically? Is it as simple as just extending ExpressionHandler and doing this.expression = "group(foo)" ?
Thanks for all your help :) -
9. Re: Dynamic Group / PooledActors
kukeltje Apr 2, 2009 11:53 AM (in response to claym)sigh.....
please read.....
1: Assign task to pooledActor with the groupname
2: new user logs in
3: decide what groups that user is a member of NOW
4: look up the pooled tasks using the groupnames from 2
fixed... -
10. Re: Dynamic Group / PooledActors
claym Apr 2, 2009 12:08 PM (in response to claym)Ok, I think we're both getting frustrated :)
Perhaps I'm not understanding or explaining things right.
1) Is this right? In my ExpressionHandler, do something like:assign(Assignable assignable, ExecutionContext executionContext) { // do some stuff to dynamically figure out what group to assign to assignable.setPooledActors(new String[] { "group(my-dynamic-group)"}); }
2) I would actually like to do task lookups by pooled actorId, not group id. If this is not possible, I can probably get around it. -
11. Re: Dynamic Group / PooledActors
kukeltje Apr 2, 2009 1:43 PM (in response to claym)1: no
assign(Assignable assignable, ExecutionContext executionContext) { // do some stuff to dynamically figure out what group to assign to assignable.setPooledActors(new String[] { "my-dynamic-group"}); }
Assign to the group NAME, not use an expression
2: Why is this such a problem? ANY decent I&AM solution has a way to decide which groups a user belong to....
as mentioned multiple times in this topic and other ones... for the engine any string you put in the pooled actors is just a string.... without meaning. You give the meaning to it yourself. That is the nice thing wich makes it flexible -
12. Re: Dynamic Group / PooledActors
claym Apr 2, 2009 2:19 PM (in response to claym)Wait, I think I actually get it.
You're saying that since the value of the actorId is pretty much disconnected from reality, I can use any arbitrary string as the actorId, which would mean using the group name.
And as long as I can figure out what the group name is when assigning AND when querying, I can do it however I like.
When you were saying "group" I was thinking JBPM identity group, not my-own-custom-group.
Sorry for being thick headed about this. In my defense, I've been on pain medication :)
Thanks for the help. -
13. Re: Dynamic Group / PooledActors
kukeltje Apr 3, 2009 12:51 PM (in response to claym)Yep.... no problem... glad you got it eventually :-)