AnsweredAssumed Answered

custom workflow with multiple assignees

Question asked by vincent-kali on Mar 12, 2016
Latest reply on Mar 22, 2016 by jithin
Hi,
I'm trying to create a custom workflow in order to approve a document in 3 steps.
I want the initiator to select the 3 groupes that will be assigned to each steps.
My problem: I'm unable to render the appropriate control on the start task form.
(no group assignee control appear)

Extract of bpmn file:

<process id="demo" name="3 steps Review And Approve Process" isExecutable="true"> 
<startEvent id="start" activiti:formKey="mymodel:myStartTask"></startEvent>



Model file:

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="mymodel:workflowmodel"
      xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
      <import uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="demo.worflow"
            prefix="mymodel" />
   </namespaces>   
<types>
   <type name="mymodel:myStartTask">
      <parent>wf:submitConcurrentReviewTask</parent>
      <mandatory-aspects>
         <aspect>mymodel:groupAssigneeStep1</aspect>
         <aspect>mymodel:assigneeStep2</aspect>
         <aspect>mymodel:groupAssigneeStep3</aspect>
      </mandatory-aspects>
   </type>
</types>
<aspects>
   <aspect name="mymodel:groupAssigneeStep1">
      <parent>bpm:groupAssignee</parent>
   </aspect>
   <aspect name="mymodel:assigneeStep2">
      <parent>bpm:assignee</parent>
   </aspect>
   <aspect name="mymodel:groupAssigneeStep3">
      <parent>bpm:groupAssignee</parent>
   </aspect>
</aspects>

</model>


SURF config file:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<alfresco-configuration>

   <config evaluator="string-compare" condition="activiti$demo">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
            <show id="mymodel:groupAssigneeStep1" />
            <show id="mymodel:assigneeStep2" />
            <show id="mymodel:groupAssigneeStep3" />
               <show id="packageItems" />
               <show id="bpm:sendEMailNotifications" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />

               <field id="bpm:workflowDescription" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info">
                  <control template="/org/alfresco/components/form/controls/date.ftl">
                      <control-param name="showTime">false</control-param>
                      <control-param name="submitTime">false</control-param>
                  </control>
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
            <field id="mymodel:groupAssigneeStep1" label-id="workflow.field.review_group" set="assignee" />
            <field id="mymodel:assigneeStep2" label-id="workflow.field.review_group" set="assignee" />
            <field id="mymodel:groupAssigneeStep3" label-id="workflow.field.review_group" set="assignee" />
              
            <field id="wf:requiredApprovePercent" label-id="workflow.field.requiredApprovePercent" set="assignee">
                  <control template="/org/alfresco/components/form/controls/percentage-approve.ftl">
                     <control-param name="minValue">1</control-param>
                     <control-param name="maxValue">100</control-param>
                  </control>
               </field>
               <field id="packageItems" set="items" />
               <field id="bpm:sendEMailNotifications" set="other">
                  <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>

</alfresco-configuration>


Any advice ?
Thanks



Outcomes