[jboss-jira] [JBoss JIRA] Commented: (JBPM-788) [Identity component] ExpressionAssigmentHandler assigning group to pooled actors assigns group name not actors

Tom Baeyens (JIRA) jira-events at lists.jboss.org
Wed Apr 18 04:49:30 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBPM-788?page=comments#action_12359659 ] 
            
Tom Baeyens commented on JBPM-788:
----------------------------------

i'm going to rename pooled actors to candidates in the next gen version of jbpm

> [Identity component] ExpressionAssigmentHandler assigning group to pooled actors assigns group name not actors
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: JBPM-788
>                 URL: http://jira.jboss.com/jira/browse/JBPM-788
>             Project: JBoss jBPM
>          Issue Type: Bug
>          Components: Core Engine
>            Reporter: Luk Zdobylak
>         Assigned To: Tom Baeyens
>
> FIle ExpressionAssigmentHandler.java
> from package org.jbpm.identity.assignment 
> lines from 91-94 
> } else if (entity instanceof Group) {
>         // put the group in the pool
>         assignable.setPooledActors(new String []{entity.getName()});
> }
> It seems that in line :         assignable.setPooledActors(new String []{entity.getName()});
> should be put not entity name but there should be code that retreives all actors assigned to group and prepares String[] array of their ids.
> sollution code to insert instead of code above:
> else if (entity instanceof Group) {
>         // put the group in the pool
>           Group g=(Group)entity;
>           Iterator i=g.getUsers().iterator();
>           String[] actorids=new String[g.getUsers().size()];
>           int j=0;
>         while (i.hasNext()) {
>             User user = (User) i.next();
>             actorids[j++]=user.getName();
>         }  
>         assignable.setPooledActors(actorids);
>       }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list