cancel
Showing results for 
Search instead for 
Did you mean: 

pooledactors group name literal

rhofkens
Champ in-the-making
Champ in-the-making
Hello,

the new pooled tasks functionality in 2.0 is very useful.  I've managed to get it working in my customs flows with:


   <swimlane name="document-managers">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{bpm_groupAssignee}</pooledactors>
      </assignment>
   </swimlane>
The assigned group is selected in the property sheet when starting the workflow.
According to the wiki, it's possible to use a group name literal here as well, this would mean the user doesn't have to pick one himself.  I've tried:



   <swimlane name="document-managers">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>document-managers</pooledactors>
      </assignment>
   </swimlane>

Using this swimlane leads to an error, even though the document-managers group exists in the repo:


16:24:15,836 ERROR [org.alfresco.web.ui.common.Utils] A system error happened during the operation: Failed to signal transition 'open_signup' from workflow task 'jbpm$25'
org.alfresco.service.cmr.workflow.WorkflowException: Failed to signal transition 'open_signup' from workflow task 'jbpm$25'
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.endTask(JBPMEngine.java:1064)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.endTask(WorkflowServiceImpl.java:347)

I've also played around a bit with the new Javascript getGroup function but I don't seem to get it right.  Any ideas?

cheers,
Roeland.
4 REPLIES 4

seshu
Champ in-the-making
Champ in-the-making
Try this. If your group is document-managers

<pooledactors>#{people.getGroup('GROUP_document-managers')}</pooledactors>

rhofkens
Champ in-the-making
Champ in-the-making
Ok, that does the trick. I missed the "GROUP_" part.

thanks!

Roeland.

davidc
Star Contributor
Star Contributor
You can also shorten it to:

<pooledactors>GROUP_document-managers</pooledactors>

jimcornmell
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to do the same thing but cannot get the job to start in a pool.  It always gets assigned to the user who started the workflow (in my case admin, as its fired off by an action, in java, behind the scenes when a file is placed into a folder).  I've tried exlicitly stating the pool in the initiator to <pooledactors>GROUP_Specials-Team1-Artists</pooledactors> so the start-state gets the job assigned to the pool, but it just ignores it.

Any help appretiated.

Jim

Here is my process definition:
<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="mywf:my_migration_workflow">
   <swimlane name="artistsPool">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>GROUP_Specials-Team1-Artists</pooledactors>
      </assignment>
   </swimlane>

   <swimlane name="artist">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <actor>#{mywf_artist}</actor>
      </assignment>
   </swimlane>

   <swimlane name="initiator">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>GROUP_Specials-Team1-Artists</pooledactors>
      </assignment>
   </swimlane>

   <start-state name="Start">
      <task name="mywf:waitingForArtistTask" swimlane="initiator" />
      <transition name="Work this advert" to="Create">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               <variable name="mywf_artist" access="write" />
               <expression>
                  mywf_artist = person.properties.userName;
               </expression>
            </script>
         </action>
      </transition>
   </start-state>

   <task-node name="Create">
      <task name="mywf:createTask" swimlane="artist" />
      <transition name="Complete Job" to="Approved">
      </transition>
   </task-node>

   <end-state name="Approved" />
</process-definition>
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.