AnsweredAssumed Answered

Workflow - multiple assignee

Question asked by wity on Apr 17, 2018
Latest reply on Apr 18, 2018 by afaust

Hello,

  I'm trying to create a workflow using eclipse activity in which 5 users will be selected at the beginning and will be sequenced as they have been selected for approval.

 

Unfortunately, after selecting workflow users, it writes an error: Workflow could not be started. Catalina log has no ERROR.

 

bootstrap-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
>


    <!-- The bootstrap-context.xml file is used for patch definitions, importers,
  workflow, and loading custom content models.  -->



    <!-- Registration of new models -->
    <bean id="DemoWf-repo.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/module/${project.artifactId}/model/digipaper-demo-wf-model.xml</value>
            </list>
        </property>
    </bean>
   
    <bean id="DemoWf-repo" parent="workflowDeployer">
<property name="workflowDefinitions">
<list>
<props>
<prop key="engineId">activiti</prop>
<prop key="location">alfresco/module/${project.artifactId}/workflow/digipaperWorkflowDemo.bpmn.xml</prop>
<prop key="mimetype">text/xml</prop>
<prop key="redeploy">true</prop>
</props>
</list>
</property>
  </bean>

</beans>

 

digipaper-demo-wf-model.xml

<?xml version="1.0" encoding="UTF-8"?>
<model name="digipaperdemowf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

     <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/content/1.0" prefix="cm" />
     </imports>

     <namespaces>
          <namespace uri="http://digipaper.cz/alfresco/digipaper/demowf/0.1" prefix="digipaperdemowf" />
     </namespaces>

     <types>
          <type name="digipaperdemowf:start">
               <title>Zahájení workflow</title>
               <parent>bpm:startTask</parent>
               <properties>
               </properties>
                <associations>
              </associations>
          <mandatory-aspects>
                    <aspect>digipaperdemowf:assignees</aspect>                    
               </mandatory-aspects>
          </type>
          
          



          <type name="digipaperdemowf:firstReview">
               <title>Schvalování</title>
               <parent>bpm:activitiOutcomeTask</parent>
               <properties>
                    <property name="digipaperdemowf:reviewOutcome1">
                         <type>d:text</type>
                         <default>Zamítnout</default>
                         <constraints>
                              <constraint name="digipaperdemowf:reviewOutcomeOptions1" type="LIST">
                                   <parameter name="allowedValues">
                                        <list>
                                             <value>Schválit</value>
                                             <value>Zamítnout</value>
                                        </list>
                                   </parameter>
                              </constraint>
                         </constraints>
                    </property>
                    <property name="digipaperdemowf:firstReviewComment">
                         <title>Komentář</title>
                         <type>d:text</type>
                    </property>
               </properties>
               <mandatory-aspects>
<aspect>digipaperdemowf:assignees</aspect>
                    
               </mandatory-aspects>

          </type>
          
          <type name="digipaperdemowf:secondReview">
               <title>Schvalování 2</title>
               <parent>bpm:activitiOutcomeTask</parent>
               <properties>
                    <property name="digipaperdemowf:reviewOutcome2">
                         <type>d:text</type>
                         <default>Zamítnout</default>
                         <constraints>
                              <constraint name="digipaperdemowf:reviewOutcomeOptions2" type="LIST">
                                   <parameter name="allowedValues">
                                        <list>
                                             <value>Schválit</value>
                                             <value>Zamítnout</value>
                                        </list>
                                   </parameter>
                              </constraint>
                         </constraints>
                    </property>
                    <property name="digipaperdemowf:secondReviewComment">
                         <title>Komentář</title>
                         <type>d:text</type>
                    </property>
               </properties>
               <mandatory-aspects>

                    <aspect>digipaperdemowf:assignees</aspect>

               </mandatory-aspects>

          </type>
          
          
          <type name="digipaperdemowf:threeReview">
               <title>Schvalování 3</title>
               <parent>bpm:activitiOutcomeTask</parent>
               <properties>
                    <property name="digipaperdemowf:reviewOutcome3">
                         <type>d:text</type>
                         <default>Zamítnout</default>
                         <constraints>
                              <constraint name="digipaperdemowf:reviewOutcomeOptions3" type="LIST">
                                   <parameter name="allowedValues">
                                        <list>
                                             <value>Schválit</value>
                                             <value>Zamítnout</value>
                                        </list>
                                   </parameter>
                              </constraint>
                         </constraints>
                    </property>
                    <property name="digipaperdemowf:threeReviewComment">
                         <title>Komentář</title>
                         <type>d:text</type>
                    </property>
               </properties>
               <mandatory-aspects>
<aspect>digipaperdemowf:assignees</aspect>
                    

               </mandatory-aspects>

          </type>
          
          <type name="digipaperdemowf:fourReview">
               <title>Schvalování 4</title>
               <parent>bpm:activitiOutcomeTask</parent>
               <properties>
                    <property name="digipaperdemowf:reviewOutcome4">
                         <type>d:text</type>
                         <default>Zamítnout</default>
                         <constraints>
                              <constraint name="digipaperdemowf:reviewOutcomeOptions4" type="LIST">
                                   <parameter name="allowedValues">
                                        <list>
                                             <value>Schválit</value>
                                             <value>Zamítnout</value>
                                        </list>
                                   </parameter>
                              </constraint>
                         </constraints>
                    </property>
                    <property name="digipaperdemowf:fourReviewComment">
                         <title>Komentář</title>
                         <type>d:text</type>
                    </property>
               </properties>
               <mandatory-aspects>
<aspect>digipaperdemowf:assignees</aspect>
                    

               </mandatory-aspects>

          </type>
          
          <type name="digipaperdemowf:fiveReview">
               <title>Schvalování 5</title>
               <parent>bpm:activitiOutcomeTask</parent>
               <properties>
                    <property name="digipaperdemowf:reviewOutcome5">
                         <type>d:text</type>
                         <default>Zamítnout</default>
                         <constraints>
                              <constraint name="digipaperdemowf:reviewOutcomeOptions5" type="LIST">
                                   <parameter name="allowedValues">
                                        <list>
                                             <value>Schválit</value>
                                             <value>Zamítnout</value>
                                        </list>
                                   </parameter>
                              </constraint>
                         </constraints>
                    </property>
                    <property name="digipaperdemowf:fiveReviewComment">
                         <title>Komentář</title>
                         <type>d:text</type>
                    </property>
               </properties>
               <mandatory-aspects>

                    <aspect>digipaperdemowf:assignees</aspect>

               </mandatory-aspects>

          </type>



          <type name="digipaperdemowf:finalReview">
               <title>Konečné rozhodnutí</title>
               <parent>bpm:workflowTask</parent>
               <properties>
                    <property name="digipaperdemowf:firstReviewCommentFinal">
                         <title>Komentář z prvního kroku</title>
                         <type>d:text</type>
                    </property>
                    <property name="digipaperdemowf:secondReviewCommentFinal">
                         <title>Komentář z druhého kroku</title>
                         <type>d:text</type>
                    </property>
                    <property name="digipaperdemowf:threeReviewCommentFinal">
                         <title>Komentář z třetího kroku</title>
                         <type>d:text</type>
                    </property>
                    <property name="digipaperdemowf:fourReviewCommentFinal">
                         <title>Komentář ze čtvrtého kroku</title>
                         <type>d:text</type>
                    </property>
                    <property name="digipaperdemowf:fiveReviewCommentFinal">
                         <title>Komentář z pátého kroku</title>
                         <type>d:text</type>
                    </property>
                    
               </properties>
          </type>
     </types>
     
     
     
     <aspects>
   
        <!--                       -->
        <!-- Aspekty -->
        <!--                       -->
       
          <aspect name="digipaperdemowf:assignees">       
            <associations>

               <association name="digipaperdemowf:assignee1">
            <title>firstassignee</title>
            <source>
                <mandatory>false</mandatory>
                <many>false</many>
            </source>
            <target>
                <class>cm:person</class>
                <mandatory>false</mandatory>
                <many>false</many>
            </target>
        </association>
        <association name="digipaperdemowf:assignee2">
            <title>secondassignee</title>
            <source>
                <mandatory>false</mandatory>
                <many>false</many>
            </source>
            <target>
                <class>cm:person</class>
                <mandatory>false</mandatory>
                <many>false</many>
            </target>
        </association>
          <association name="digipaperdemowf:assignee3">
            <title>threedassignee</title>
            <source>
                <mandatory>false</mandatory>
                <many>false</many>
            </source>
            <target>
                <class>cm:person</class>
                <mandatory>false</mandatory>
                <many>false</many>
            </target>
        </association>
          <association name="digipaperdemowf:assignee4">
            <title>fourassignee</title>
            <source>
                <mandatory>false</mandatory>
                <many>false</many>
            </source>
            <target>
                <class>cm:person</class>
                <mandatory>false</mandatory>
                <many>false</many>
            </target>
        </association>
          <association name="digipaperdemowf:assignee5">
            <title>fivedassignee</title>
            <source>
                <mandatory>false</mandatory>
                <many>false</many>
            </source>
            <target>
                <class>cm:person</class>
                <mandatory>false</mandatory>
                <many>false</many>
            </target>
        </association>

            </associations>
        </aspect>
       
       

        </aspects>
</model>

 

share-config-custom.xml

<!-- Share configuration related to this particular Share module extension, 
     such as: - Doclib action config - Form config - Aspect and Type config Note.
     Any configuration related to the whole Share.war webapp (i.e. not specific
     to this share extension) should be placed in the environment specific config:
     alfresco/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml
     file -->

<alfresco-config>

<config evaluator="string-compare" condition="activiti$DigipaperDigipaperDemoWf">
          <forms>
               <form>
                    <field-visibility>
                         <show id="bpm:workflowDescription" />
                         <show id="bpm:workflowDueDate" />
                         <show id="bpm:workflowPriority" />
                         <show id="digipaperdemowf:assignee1" />
                         <show id="digipaperdemowf:assignee2" />
                         <show id="digipaperdemowf:assignee3" />
                         <show id="digipaperdemowf:assignee4" />
                         <show id="digipaperdemowf:assignee5" />
                         <show id="packageItems" />
                         <show id="bpm:sendEMailNotifications" />
                    </field-visibility>
                    <appearance>
                                                  
                         <set id="" appearance="title" label-id="workflow.set.general" />
                         <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>
                         
                         <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
                         <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info" />                    
                         <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                              <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
                         </field>
                         
                         <set id="assignee" appearance="title" label-id="workflow.set.assignees" />
                         <field id="digipaperdemowf:assignee1" label-id="workflow.field.reviewer" set="assignee"> </field>
                         <field id="digipaperdemowf:assignee2" label-id="workflow.field.reviewer" set="assignee"> </field>
                         <field id="digipaperdemowf:assignee3" label-id="workflow.field.reviewer" set="assignee"> </field>
                         <field id="digipaperdemowf:assignee4" label-id="workflow.field.reviewer" set="assignee"> </field>
                         <field id="digipaperdemowf:assignee5" label-id="workflow.field.reviewer" set="assignee"> </field>
                         
                         <set id="items" appearance="title" label-id="workflow.set.items" />
                         <field id="packageItems" set="items" />
                         
                         <set id="other" appearance="title" label-id="workflow.set.other" />
                         <field id="bpm:sendEMailNotifications" set="other">
                              <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" />
                         </field>
                    </appearance>
               </form>
          </forms>
     </config>
     




     <config evaluator="task-type" condition="digipaperdemowf:firstReview">
          <forms>
               <form>
                    <field-visibility>
                         <show id="message" />
                         <show id="taskOwner" />
                         <show id="bpm:dueDate" />
                         <!-- <show id="bpm:assignee" /> -->
                         <show