cancel
Showing results for 
Search instead for 
Did you mean: 

set user group on an advanced workflow

frizzello
Champ in-the-making
Champ in-the-making
Hi,

My boss asked me to customize reviewpooled advanced workflow(review_pooled_processdefinition.xml) to have already a selected group on Users and Roles list instead of selecting one, is it possible?

Thank you,

Francesco
4 REPLIES 4

jpotts
World-Class Innovator
World-Class Innovator

frizzello
Champ in-the-making
Champ in-the-making
Thank u for your answer,

I have tried to change in review_pooled_processdefinition.xml

<swimlane name="reviewer">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
                <pooledactors>#{bpm_groupAssignee}</pooledactors>
        </assignment>   
    </swimlane>

in

<swimlane name="reviewer">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
              <pooledactors>#{people.getGroup('GROUP_PubblicatoriOsservatorio')}</pooledactors>
        </assignment>   
    </swimlane>

but in review pooled workflow is mandatory to pick a user with a sort of a:genericPicker, can i force that to become assigned to a particular existring group? Which file have i to change too?

thanks a lot

jpotts
World-Class Innovator
World-Class Innovator
If you read the tutorial, you'll find out that there is a workflow model which defines the metadata for a process and a UI configuration file that defines how those fields are rendered to the end-user. The out-of-the-box UI config file for this particular piece is web-client-config-properties.xml and in it you'll see that bpm:startTask is configured to show the assignee field:


   <config evaluator="node-type" condition="bpm:startTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
         <show-property name="bpm:workflowPriority" />
         <show-property name="bpm:workflowDueDate" />
         <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
         <show-association name="bpm:assignee" />
      </property-sheet>
   </config>


Now, if you look at the tutorial source code, you'll see the custom web client configuration file, web-client-config-custom.xml. The workflow in that case uses a type called scwf:submitReviewTask and it is configured to NOT show the assignee field:


    <config evaluator="node-type" condition="scwf:submitReviewTask" replace="true">
        <property-sheet>
            <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
            <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
        </property-sheet>
    </config>


So your best bet is to essentially copy the out-of-the-box workflow into your own custom extension and then modify the UI config XML to not show the assignee. Then you can set it in your process.

Jeff

frizzello
Champ in-the-making
Champ in-the-making
I wrote a wrong name for my group, now it works

Thank you