AnsweredAssumed Answered

Invalid pooled actor value.

Question asked by nowhere on Apr 26, 2009
Latest reply on Aug 13, 2009 by nowhere
Hi all,
I wrote some code for workflow management against Alfresco API but I'm facing with an annoying problem.

My workflows, really simple, appear so:

<start-state name="start">
      <task name="wf:fittizio" swimlane="initiator"/>
      <transition name="" to="startActivity">
    <swimlane name="responsabili">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">

   <task-node name="startActivity">
      <task name="wf:start" swimlane="initiator"/>
      <transition name="Start" to="test">
   </task-node> …..

Suppose I'm in "fittizio" task…I want to advance in "start" task…. so I wrote some code:

                               WorkflowTaskQuery query = new WorkflowTaskQuery();
         List<WorkflowTask> tasks = this.workflowService.queryTasks(query);
         for (WorkflowTask w : tasks){
            Map<QName, Serializable> props =;
         if ("wf:start")){
            props.put(QName.createQName("", "mail"), mail);
            props.put(QName.createQName("", "subject"), oggetto);
            props.put(QName.createQName("", "groupAssignee"), group);
            props.put(WorkflowModel.ASSOC_POOLED_ACTORS,  (Serializable)pooledNodeRefs);
                                       w =workflowService.updateTask(, props, null, null);
         if ("wf:fittizio")){
            props.put(WorkflowModel.ASSOC_POOLED_ACTORS, (Serializable)pooledNodeRefs);
            props.put(QName.createQName("", "groupAssignee"), group);
            w = workflowService.updateTask(, props, null, null);
            wfittizio = w;

Where pooledNodeRefs in props.put(WorkflowModel.ASSOC_POOLED_ACTORS,  (Serializable)pooledNodeRefs); is List<NodeRef> pooledNodeRefs = new ArrayList<NodeRef>(); and I fill it with person node as follows:

       List groupMembers = new ArrayList();
         groupMembers = (List)nodeService.getProperty(group, QName.createQName("", "members"));
         Iterator itActors = groupMembers.iterator();
         while (itActors.hasNext()) {
                                         String pairs = (String);
                                        NodeRef user = personService.getPerson(pairs);

But I get following error on UpdateTask:

Wrapped Exception (with status template): Pooled actors value '[Node Type: {}person, Node Aspects: [{}referenceable, {}configurable], Node Type: {}person, Node Aspects: [{}referenceable, {}configurable]]' is invalid

I also tried to fill it whit group nodeRef:

                    NodeRef pooledNodeRef = null;
       if (authorityDAO.authorityExists(authorityDAO.getAuthorityName(group)))
         pooledNodeRef = authorityDAO.getAuthorityNodeRefOrNull(authorityDAO.getAuthorityName(group));
       if (pooledNodeRef != null)
         pooledNodeRefs.add(pooledNodeRef );

And I get another similar error:

Wrapped Exception (with status template): Pooled actors value '[Node Type: {}authorityContainer, Node Aspects: [{}referenceable]]' is invalid

I inspected WorkflowService and JBPMEngine code, I saw it must be a list of nodeRef…but I don't know the right type of it. Can anyone help me? It's very important!
Excuse me for not clear and confused code…it's my first approach to this Alfresco workflow api.
Thanks for any suggestion!