AnsweredAssumed Answered

Unable to update task associations

Question asked by azivotic on Mar 13, 2012
Latest reply on Apr 10, 2012 by pero
Hi,

I defined my custom workflow with alfresco/activiti. In my model i defined custom aspect which beside some properties has associations which will represent members of some team


<aspects>
        <aspect name="mcwm:projectCharter">
             <properties>
                      ……..
                    <property name="cm:userName">
                     ……….
                    </property>
              </properties>
              <associations>
                    <association name="mcwm:teamWithDoc">
                            <source>
                                  <mandatory>false</mandatory>
                                  <many>false</many>
                           </source>
                           <target>
                                   <class>cm:person</class>
                                   <mandatory>false</mandatory>
                                   <many>true</many>
                             </target>
                    </association>
          </associations>
</aspect>

Now, in my workflow i have 5 tasks, and on every task i set mandatory aspect which i described above.

<types>
   <!–type for start form–>
   <type name="mcwm:submitStart">
      <parent>bpm:startTask</parent>
           ….some properties…….
          <mandatory-aspects>
         <aspect>bpm:assignee</aspect>
         <aspect>mcwm:projectCharter</aspect>
      </mandatory-aspects>
   </type>
</types>

The problem is that if some user for example on beginning of process on task 1 set association mcwm:teamWithDoc (pick members of team from alfresco repository), property is nice passed to task 2. But if some other user which is assigned to task 2 change mcwm:teamWithDoc (e.g. add some more team members or delete some team members) on task 3 these changes are not seen. On task 3 mcwm:teamWithDoc has value which is set on start task. The same case is with other task, whatever other users done with mcwm:teamWithDoc on task 2, task 3 or task 4, mcwm:teamWithDoc always has value which is set on beginning?

Any idea how to update this association?

P.S. I update my regular properties between task using execution.setVariable('propertName', task.getVariable('propertName')); but for association this isn't functioning.

Regards,
Aleksandar

Outcomes