cancel
Showing results for 
Search instead for 
Did you mean: 

Pooled actors value invalid

vinkk
Champ in-the-making
Champ in-the-making
hi iam trying to reassign a task to a group, but i get follwoing errors.

i tried both these code.

1.

params.put(WorkflowModel.ASSOC_POOLED_ACTORS, (Serializable)pooledNodeRefs);
          
2.

params.put(WorkflowModel.ASSOC_POOLED_ACTORS, "testgroup");

but  i get following errors

      <tr><td><b>Message:</b></td><td>Wrapped Exception (with status template): Pooled actors value '



[Node Type: {http://www.alfresco.org/model/content/1.0}person,
Node Aspects: [{http://www.alfresco.org/model/system/1.0}referenceable, {http://www.alfresco.org/model/application/1.0}configurable],
Node Type: {http://www.alfresco.org/model/content/1.0}person,
Node Aspects: [{http://www.alfresco.org/model/content/1.0}ownable, {http://www.alfresco.org/model/application/1.0}configurable, {http://www.alfresco.org/model/system/1.0}referenceable],
Node Type: {http://www.alfresco.org/model/content/1.0}person,
Node Aspects: [{http://www.alfresco.org/model/application/1.0}configurable, {http://www.alfresco.org/model/content/1.0}ownable, {http://www.alfresco.org/model/system/1.0}referenceable],
Node Type: {http://www.alfresco.org/model/content/1.0}person,
Node Aspects: [{http://www.alfresco.org/model/application/1.0}configurable, {http://www.alfresco.org/model/content/1.0}ownable, {http://www.alfresco.org/model/system/1.0}referenceable]]'
is invalid</td></tr>

the error comes this line in jbpmengine 2184

  else if (key.equals(ContentModel.PROP_OWNER))
                {
                    if (value != null && !(value instanceof String))
                    {
                        throw new WorkflowException("Task owner '" + value + "' is invalid");
                    }


vin kk
6 REPLIES 6

cheffilet
Champ in-the-making
Champ in-the-making
Please use instead of a normal array the class JBPMNodeList


JBPMNodeList nodeList = new JBPMNodeList();
nodeList.add(new JBPMNode(personNodeRef, serviceRegistry));

params.put(WorkflowModel.ASSOC_POOLED_ACTORS, (Serializable)nodeList );

vinkk
Champ in-the-making
Champ in-the-making
hi,

Thanks for the reply, i tried ur code but i get following errors.

org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): org.alfresco.repo.workflow.jbpm.JBPMNode cannot be cast to org.alfresco.service.cmr.

   <tr><td></td><td>org.alfresco.repo.workflow.jbpm.JBPMEngine.convertNodeRefs(JBPMEngine.java:2480)</td></tr>
         <tr><td></td><td>org.alfresco.repo.workflow.jbpm.JBPMEngine.setTaskProperties(JBPMEngine.java:2161)</td></tr>
     

   nodeList.add(new JBPMNode(personNodeRef, serviceRegistry));
           params.put(WorkflowModel.ASSOC_POOLED_ACTORS, (Serializable)nodeList );
           workflowService.updateTask(taskid, params, null, null);

here my personNodeRef is nodeRef

please help

thanks
vinkk

cheffilet
Champ in-the-making
Champ in-the-making
Sorry my fault again:


List nl = new LinkedList();
nl.add( new NodeRef("workspace://SpacesStore/7f88da63-cf01-4182-8cf2-56af9e10ce1b"));
Map<QName, Serializable> mp = new HashMap<QName, Serializable>();
mp.put(WorkflowModel.ASSOC_POOLED_ACTORS, (Serializable)nl);
mp.put(ContentModel.PROP_OWNER, null);
serviceRegistry.getWorkflowService().updateTask("jbpm$4", mp, null, null);


This operation turns back an ownership and sets-up a pooled-task

vinkk
Champ in-the-making
Champ in-the-making
Hi thanks for the reply,

but i get the following errors in this line

serviceRegistry.getWorkflowService().updateTask(taskid, mp, null, null);
     

  <tr><td></td><td> </td></tr>
   <tr><td><b>Exception:</b></td><td>org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): Pooled actors value '[Node Type: {http://www.alfresco.org/model/content/1.0}person, Node Aspects: [{http://www.alfresco.org/model/content/1.0}ownable, {http://www.alfresco.org/model/application/1.0}configurable, {http://www.alfresco.org/model/system/1.0}referenceable]]' is invalid</td></tr>
   <tr><td></td><td> </td></tr>
      <tr><td></td><td>org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:622)</td></tr>
   <tr><td></td><td> </td></tr>

can u please help me?

thanks
vin.

vinkk
Champ in-the-making
Champ in-the-making
Hi
it throw error this part in JBPMEngine.java,

              else if (value instanceof JBPMNode)
                        {
                            JBPMNode node = (JBPMNode)value;
                            pooledActors = new String[] {mapAuthorityToName(node.getNodeRef())};
                        }
                        else
                        {
                            throw new WorkflowException("Pooled actors value '" + value + "' is invalid");
                        }
          
here it is throwing error in else part.

any help please.

thanks
vin.

cheffilet
Champ in-the-making
Champ in-the-making
Please post the whole script so we can get more informations about your problem.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.