cancel
Showing results for 
Search instead for 
Did you mean: 

View associations

sov_stubbbr
Champ in-the-making
Champ in-the-making
Hi all, i am new in Alfresco.
When i start workflow i set association property, and i want to see that association in another task workflow. How can i do this?

Snippet from processDefinition.xml:
   <start-state name="start">
      <task name="pwrwf:submitProcess" swimlane="initiator"/>
      <transition to="agreement"></transition>
   </start-state>

   <task-node name="agreement">      
       <task name="pwrwf:agreement" swimlane="agreementActors"/>
      <transition name="agree" to="approvement"></transition>
      <transition name="disagree" to="revise" ></transition>
   </task-node>

Snippet from model.xml:
      <type name="pwrwf:submitProcess">
         <parent>bpm:startTask</parent>
         <associations>
            <association name="pwrwf:relatedContent">
               <title>Doc with rules</title>
               <source>
                    <mandatory>true</mandatory>
                    <many>false</many>
               </source>
               <target>
                  <class>cm:content</class>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </target>
            </association>
         </associations>
         <mandatory-aspects>
             <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

      <type name="pwrwf:agreement">
         <parent>bpm:workflowTask</parent>
      </type>

Snippet from web-client-config-custom.xml:
   <config evaluator="node-type" condition="pwrwf:submitProcess" 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:comment" component-generator="TextAreaGenerator" />
         <show-association name="bpm:assignee" display-labelid="wf_adhoc_assign_to" />
         <show-association name="pwrwf:relatedContent" />      
      </property-sheet>
   </config>

What i need to do to see association "pwrwf:relatedContent" in task-node:"agreement" and edit this association?

Thank you!
2 REPLIES 2

nowhere
Champ in-the-making
Champ in-the-making
Maybe you should add this to web-client-config-custom:

<config evaluator="node-type" condition="pwrwf:agreement" replace="true">
<property-sheet>
<separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
<show-association name="pwrwf:relatedContent" />
</property-sheet>
</config>

It's a starting point, let me know 🙂
Have a good day!

nowhere
Champ in-the-making
Champ in-the-making
Sorry, I forgot logically you have to add this to your model

<type name="pwrwf:agreement">
   <parent>bpm:workflowTask</parent>
        <properties>
           
        </properties>
        <associations>
<association name="pwrwf:relatedContent">
<title>Doc with rules</title>
<source>
<mandatory>true</mandatory>
<many>false</many>
</source>
<target>
<class>cm:content</class>
<mandatory>false</mandatory>
<many>false</many>
</target>
</association>
</associations>
     </type>

For property this work, you could try for associations.