cancel
Showing results for 
Search instead for 
Did you mean: 

start workflow with assign user + group

vinaxwater
Champ in-the-making
Champ in-the-making
Dear all! I want when i assignee i must selected user and group (e.g i have 2 user test1 and test2, 1group customer i want assign for 2 user and 1 group in same workflow). Thanks for read.
13 REPLIES 13

maraki
Champ in-the-making
Champ in-the-making
Noone Knows????

jwrobel
Champ in-the-making
Champ in-the-making
Hey vinaxwater,
To assign both a group and a person you have to edit three files: your workflowmodel.xml, your processdefinition.xml and web-client-config-custom.xml.

Firstly, you have add the aspects to your model.
your workflowmodel.xml

<type name="swf:taskname">
…   
   <mandatory-aspects>
      <aspect>bpm:assignee</aspect>
      <aspect>bpm:groupAssignee</aspect>
   </mandatory-aspects>
…                  
</type>

Secondly, you have to setup your processdefinition.xml to use the bpm_assignee (one person) and bpm_groupAssignee (one group). Sidenote: There are also other assignments.


your processdefinition.xml

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

Finally, you have to expose the elements in the Alfresco Web UI.

web-client-config-custom.xml

<alfresco-config>

<config evaluator="node-type" condition="swf:taskname" replace="true">
   <property-sheet>
      <show-association name="bpm:groupAssignee" />
      <show-association name="bpm:assignee" />
   </property-sheet>
</config>

</alfresco-config>

-Justin

vinaxwater
Champ in-the-making
Champ in-the-making
Dear!
vinaxwater's Alfresco project is completed. Therefore I don't regular login alfresco forum.
About this issuse. In file process is not change We develop in source core below tier. That is in UI normal if you use parameter bpm_assignees you will have users for selected, if you use bpm_groupAssignees you will have groups for selected.

My solution is: i only have one parameter bpm_NTISgroupAssignees for use in file process. And in file process Instead of use tab <actor> or <pooledactors> I will use <foreach> with my new parameter bpm_NTISgroupAssignees.

This is Note:

Add new tab: NTISpooledactors
projects\repository\source\java\org\alfresco\repos\workflow\jbpm\AlfrescoAssignment.java

Create new parameter in Model:
projects\repository\config\alfresco\model\bmpModel.xml

Workflow Model:
projects\repository\config\alfresco\workflow\ntis_workflowModel.xml

Dispose for tab <foreach> in file process:
projects\repository\source\java\org\alfresco\repos\jscript\People.java

Regards.

giorgio
Champ in-the-making
Champ in-the-making
Hey vinaxwater,
To assign both a group and a person you have to edit three files: your workflowmodel.xml, your processdefinition.xml and web-client-config-custom.xml.

Firstly, you have add the aspects to your model.
your workflowmodel.xml

<type name="swf:taskname">
…   
   <mandatory-aspects>
      <aspect>bpm:assignee</aspect>
      <aspect>bpm:groupAssignee</aspect>
   </mandatory-aspects>
…                  
</type>

Secondly, you have to setup your processdefinition.xml to use the bpm_assignee (one person) and bpm_groupAssignee (one group). Sidenote: There are also other assignments.


your processdefinition.xml

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

Finally, you have to expose the elements in the Alfresco Web UI.

web-client-config-custom.xml

<alfresco-config>

<config evaluator="node-type" condition="swf:taskname" replace="true">
   <property-sheet>
      <show-association name="bpm:groupAssignee" />
      <show-association name="bpm:assignee" />
   </property-sheet>
</config>

</alfresco-config>

-Justin

Hi Justin, I followed your steps but I always throw an error that I am missing a parameter that is required or other errors. I can spend a full code example?

Thank you