AnsweredAssumed Answered

my workflow can not transfer value

Question asked by evan on Aug 25, 2010
Latest reply on Jul 31, 2011 by mabukhaled
Hi my friend,
     
         I encountered a problem that can't be resolved by myself and I hope to seek resolutions from you. I defined a workflow which can run through all tasks defined in processdefinition.xml files.However, the problem is,  the content filled out in last task can't be displayed in the next task. I tried in the back-end and found there's no problem to print out what I filled out. What change should I make in order to display what I filled out?
      
All file define is below :

evan_processdefinition.xml

<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="my:evan">

<swimlane name="initiator"/>

<start-state name="start">

  <task name="my:submitHelloworldTask" swimlane="initiator" />

  <transition name="Approve by Boss" to="Absence_Request">

     </transition>

</start-state>



<swimlane name="assignee">

      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">

         <actor>#{my_t3Assignee}</actor>

      </assignment>

</swimlane>



<swimlane name="ericl">

      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">

        <actor>#{my_t1Assignee}</actor>

      </assignment>

</swimlane>

<task-node name="Absence_Request">

   <task name="my:helloTask" swimlane="assignee" >
    <event type="task-create">

  <script>

    System.out.println("———-fill in vacation form———");
   System.out.println("———-fill———"+my_employeeName);

  </script>

  <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">

    <script>            

        taskInstance.setVariable("my_employeeName","cause");    

    </script>

  </action>

  </event>

   </task>

   <transition name="rejected" to="hello">
      
   </transition>

   <transition name="approve" to="ltt">

      

   </transition>

</task-node>



<swimlane name="getassignee">

      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">

         <actor>#{my_t2Assignee}</actor>

      </assignment>

</swimlane>

<!–#####################################################################–>

<task-node name="ltt">

   <task name="my:helloEvanTask" swimlane="getassignee" >
<event type="task-create">

       <script>

             System.out.println("———-fill in vacation form———");
         System.out.println("———-fill11———"+my_employeeName);

       </script>
   <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">

          <script>            

              taskInstance.setVariable("my_employeeName","cause");    
      taskInstance.my_employeeName="cause";

          </script>

    </action>
   </event>
</task>

   <transition name="approve" to="evanTask">

</transition>

   <transition name="rejected" to="hello"></transition>

</task-node>



<task-node name="evanTask">

   <task name="my:evanTask" swimlane="ericl"></task>

  <transition name="rejected" to="hello">
   

</transition>

  <transition name="approve" to="hello">



</transition>   

</task-node>

<!–##########################################################################–>   





<task-node name="hello"> 

  <task name="my:completedhelloTask" swimlane="initiator">
   
   </task>

  <transition name="Confirmed" to="end1"/>

</task-node>

<end-state name="end1"/>

</process-definition>
evan_model.xml

<model name="my:workflowonemodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">



<description>Workflow One Model</description>

<author></author>

<version>1.0</version>



<imports>

<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />

<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />

<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>



<namespaces>

   <namespace uri="my.model" prefix="my" />

</namespaces>

 

     

  <types>

     <type name="my:submitHelloworldTask">

        <parent>bpm:startTask</parent>

        <mandatory-aspects>

      <aspect>my:vacation</aspect>

           <aspect>my:t3Assignee</aspect>

        </mandatory-aspects>

     </type> 

    

     <type name="my:helloTask">

        <parent>bpm:workflowTask</parent>

        <mandatory-aspects>     

         <aspect>my:vacation</aspect>

           <aspect>my:t2Assignee</aspect>

        </mandatory-aspects>

     </type>

    <type name="my:helloEvanTask">

        <parent>bpm:workflowTask</parent>

        <mandatory-aspects>

      <aspect>my:vacation</aspect>

         <aspect>my:t1Assignee</aspect>

        </mandatory-aspects>

     </type>

    <type name="my:evanTask">

        <parent>bpm:workflowTask</parent>

        <mandatory-aspects>

      <aspect>my:vacation</aspect>

         <aspect>my:t4Assignee</aspect>

        </mandatory-aspects>

     </type>

     <type name="my:completedhelloTask">

        <parent>bpm:workflowTask</parent>

     </type>   

  </types>

  <aspects>

      <aspect name="my:t3Assignee">

      <associations>

         <association name="my:t3Assignee">

            <source>

               <mandatory>false</mandatory>

               <many>false</many>

            </source>

            <target>

               <class>cm:person</class>

               <mandatory>false</mandatory>

               <many>false</many>

            </target>

         </association>

      </associations>

   </aspect>

   <aspect name="my:t4Assignee">

      <associations>

         <association name="my:t4Assignee">

            <source>

               <mandatory>false</mandatory>

               <many>false</many>

            </source>

            <target>

               <class>cm:person</class>

               <mandatory>false</mandatory>

               <many>false</many>

            </target>

         </association>

      </associations>

   </aspect>

      <aspect name="my:t1Assignee">

      <associations>

         <association name="my:t1Assignee">

            <source>

               <mandatory>false</mandatory>

               <many>false</many>

            </source>

            <target>

               <class>cm:person</class>

               <mandatory>false</mandatory>

               <many>false</many>

            </target>

         </association>

      </associations>

   </aspect>

   <aspect name="my:t2Assignee">

      <associations>

         <association name="my:t2Assignee">

            <source>

               <mandatory>false</mandatory>

               <many>false</many>

            </source>

            <target>

               <class>cm:person</class>

               <mandatory>false</mandatory>

               <many>false</many>

            </target>

         </association>

      </associations>

   </aspect>

    <aspect name="my:vacation">



            <title>vacation request</title>



            <properties>



          <property name="my:employeeName">



                <type>d:text</type>



                <default></default>



               </property>



            <property name="my:employeeOracelID">



                <type>d:text</type>



                <default></default>



               </property>



                <property name="my:employeeDept">



                <type>d:text</type>



                <default></default>



               </property>



               <property name="my:employeeTitle">



                  <type>d:text</type>



                  <default></default>



               </property>



      <property name="my:absenceTime">



                  <type>d:text</type>



                  <default></default>



               </property>                    



               <property name="my:absenceReason">



                  <type>d:text</type>



                  <default></default>



               </property>



            </properties>



        </aspect>

   </aspects>

</model>
web-client-config-custom.xml

<alfresco-config>


<config evaluator="node-type" condition="my:submitHelloworldTask" replace="true">



      <property-sheet>
    <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />

       

         <show-property name="my:employeeName" display-label-id="EmployeeName" />

         <show-property name="my:employeeOracelID" display-label-id="EmployeeOracelID" />

         <show-property name="my:employeeDept" display-label-id="EmployeeDept" />

         <show-property name="my:employeeTitle" display-label-id="EmployeeTitle" />

         <show-property name="my:absenceTime" display-label-id="AbsenceTime" />

         <show-property name="my:absenceReason" display-label-id="AbsenceReason" />
<separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />

         <show-association name="my:t3Assignee" display-label-id="first reviewer" />

      </property-sheet>



   </config>



   <config evaluator="node-type" condition="my:helloTask" replace="true">



      <property-sheet>



          <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />



       <show-property name="my:employeeName" display-label-id="EmployeeName" />

         <show-property name="my:employeeOracelID" display-label-id="EmployeeOracelID" />

         <show-property name="my:employeeDept" display-label-id="EmployeeDept" />

         <show-property name="my:employeeTitle" display-label-id="EmployeeTitle" />

         <show-property name="my:absenceTime" display-label-id="AbsenceTime" />

         <show-property name="my:absenceReason" display-label-id="AbsenceReason" />

          <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />

         <show-association name="my:t2Assignee" display-label-id="second reviewer" />



      </property-sheet>



   </config>

  

   <config evaluator="node-type" condition="my:helloEvanTask" replace="true">



      <property-sheet>



          <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />

         <show-property name="my:employeeName" display-label-id="EmployeeName" />

         <show-property name="my:employeeOracelID" display-label-id="EmployeeOracelID" />

         <show-property name="my:employeeDept" display-label-id="EmployeeDept" />

         <show-property name="my:employeeTitle" display-label-id="EmployeeTitle" />

         <show-property name="my:absenceTime" display-label-id="AbsenceTime" />

         <show-property name="my:absenceReason" display-label-id="AbsenceReason" />
<separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />

         <show-association name="my:t1Assignee" display-label-id="third reviewer" />



      </property-sheet>



   </config>



   <config evaluator="node-type" condition="my:evanTask" replace="true">



      <property-sheet>
       <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />

         <show-property name="my:employeeName" display-label-id="EmployeeName" />

         <show-property name="my:employeeOracelID" display-label-id="EmployeeOracelID" />

         <show-property name="my:employeeDept" display-label-id="EmployeeDept" />

         <show-property name="my:employeeTitle" display-label-id="EmployeeTitle" />

         <show-property name="my:absenceTime" display-label-id="AbsenceTime" />

         <show-property name="my:absenceReason" display-label-id="AbsenceReason" />

         <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />



         <show-association name="my:t4Assignee" display-label-id="reviewer again" />

      </property-sheet>

   </config>

   <config evaluator="node-type" condition="my:completedhelloTask" replace="true">

      <property-sheet>

         <show-property name="my:employeeName" display-label-id="my_EmployeeName" />

         <show-property name="my:employeeOracelID" display-label-id="EmployeeOracelID" />

         <show-property name="my:employeeDept" display-label-id="EmployeeDept" />

         <show-property name="my:employeeTitle" display-label-id="EmployeeTitle" />

         <show-property name="my:absenceTime" display-label-id="AbsenceTime" />

         <show-property name="my:absenceReason" display-label-id="AbsenceReason" />

      </property-sheet>

   </config>

</alfresco-config>

Outcomes