cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Workflow - package item association

krups
Champ in-the-making
Champ in-the-making
Hi there,

I am really new to activiti workflow in alfresco.
I have custom content type as follow:


   <types>
  
      <!– Definition of new Content Type –>
      <type name="tr:tenderRequest">
         <title>Tender request Form</title>
         <parent>cm:content</parent>
         <properties>
           
            <property name="tr:title">
            <title>Title</title>
                  <type>d:text</type>
            </property>
            <property name="tr:desc">
                <title>Description</title>
                <type>d:text</type>
            </property>
            <property name="tr:folderName">
                <title>Folder Name</title>
                <type>d:text</type>
                 <constraints>
                <constraint ref="tr:foldernameLength"/>
                 </constraints>
            </property>
            <property name="tr:advertDate">
                <title>Advertising Date</title>
                <type>d:date</type>
            </property>
            <property name="tr:closingDate">
                <title>Closing Date</title>
                <type>d:date</type>
            </property>
             <property name="tr:accNo">
                <title>Account No</title>
                <type>d:text</type>
            </property>
            <property name="tr:budget">
                <title>Budget Amount($)</title>
                <type>d:float</type>
            </property>
            <property name="tr:lumpsum">
                <title>Lump Sum($)</title>
                <type>d:float</type>
            </property>
            <property name="tr:estCost">
                <title>Schedule of rates - Estimated total cost($)</title>
                <type>d:float</type>
            </property>
            <property name="tr:commentBudget">
                <title>Comment for budget</title>
                <type>d:text</type>
            </property>
         </properties>
         <associations>
            <association name="tr:projectOfficer">
                <title>Project Officer</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>cm:person</class>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </target>
            </association>
           
         </associations>
      </type>
    </types>
    <aspects>
        <aspect name="tr:extendable">
            <title>Extended Tender Form</title>
            <properties>
                <property name="tr:tenderNo">
                    <title>Tender No</title>
                    <type>d:text</type>
                </property>
            </properties>
            <associations>
                <association name="tr:panelMembers">
                <title>Evaluation Panel Members</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>cm:person</class>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </target>
            </association>
            </associations>
        </aspect>
    </aspects>
….
I have created custom content and have applied aspect to it.
I want my custom approval/reject workflow.
Using activiti workflow I want to assign approval task to all panel members that I have added to my custom content.
Does anyone have any thought on it?

Thanks and regards,
1 REPLY 1

krups
Champ in-the-making
Champ in-the-making
Hello,
I've got little move.
<serviceTask id="alfrescoScripttask3" name="Alfresco Script Task" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
      <extensionElements>
        <activiti:field name="script">
          <activiti:string>

Here I have got code to get all panel members name .
then
execution.setVariable("twf_panelMembers","member1,member2");
</activiti:string>
  </activiti:field>
      </extensionElements>
    </serviceTask>

and in user task
<userTask id="panelReview" name="Panel Review" activiti:candidateUsers="${twf_panelMembers}" activiti:formKey="wf:activitiReviewTask">
</userTask>

But This user task is not getting assigned.
I am not sure what's wrong.

if I do like
<userTask id="panelReview" name="Panel Review" activiti:candidateUsers="member1,member2" activiti:formKey="wf:activitiReviewTask">
</userTask>

then that's workiing fine.

I got stuck here
Please someone help me out.

Thank you