AnsweredAssumed Answered

displaying assignee in activiti workflow approver form

Question asked by skumar.us on Jan 31, 2015
Latest reply on Mar 16, 2017 by vhelmut
I wanted to have the assignee field appearing in the first approver form, so that he/she can assign it to second approver. But I do not see that on the task/workflow description window and after the approval/rejection, the workflow does not go to the second approver instead comes back to the initiator.

What am I doing wrong? Please guide me.
<strong>My BPMN XML</strong>

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://alfresco.org">
  <process id="customactivitiReview" name="customactivitiReview" isExecutable="true">
    <startEvent id="start" activiti:formKey="wf:submitReviewTask"></startEvent>
    <sequenceFlow id="flow1" sourceRef="start" targetRef="reviewTask"></sequenceFlow>
    <userTask id="reviewTask" name="Review Task" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wf:activitiReviewTask">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;]]></activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));]]></activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow2" sourceRef="reviewTask" targetRef="reviewDecision"></sequenceFlow>
    <exclusiveGateway id="reviewDecision" name="Review Decision"></exclusiveGateway>
    <sequenceFlow id="flow3" sourceRef="reviewDecision" targetRef="approved">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${wf_reviewOutcome == 'Approve'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow4" sourceRef="reviewDecision" targetRef="rejected"></sequenceFlow>
    <userTask id="approved" name="Clerk Approved" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wf:approvedTask">
      <documentation>The document was reviewed and approved.</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;]]></activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <userTask id="rejected" name="Clerk Rejected" activiti:assignee="${initiator.exists() ? initiator.properties.userName : 'admin'}" activiti:formKey="wf:rejectedTask">
      <documentation>The document was reviewed and rejected.</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;]]></activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow5" sourceRef="rejected" targetRef="end"></sequenceFlow>
    <endEvent id="end"></endEvent>
    <userTask id="approverapproved" name="Approver Approved" activiti:assignee="${initiator.exists() ? initiator.properties.userName : 'admin'}" activiti:formKey="wf:approvedTask">
      <documentation>The document was reviewed and approved.</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;]]></activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <userTask id="approverrejected" name="Approver Rejected" activiti:assignee="${initiator.exists() ? initiator.properties.userName : 'admin'}" activiti:formKey="wf:rejectedTask">
      <documentation>The document was reviewed and rejected.</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
                if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;]]></activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow10" sourceRef="approverapproved" targetRef="end"></sequenceFlow>
    <sequenceFlow id="flow9" sourceRef="approverrejected" targetRef="end"></sequenceFlow>
    <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow6" sourceRef="approved" targetRef="exclusivegateway1"></sequenceFlow>
    <sequenceFlow id="flow8" sourceRef="exclusivegateway1" targetRef="approverrejected"></sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="exclusivegateway1" targetRef="approverapproved"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_customactivitiReview">
    <bpmndi:BPMNPlane bpmnElement="activitiAPReview" id="BPMNPlane_customactivitiReview">
      <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
        <omgdc:Bounds height="35.0" width="35.0" x="30.0" y="200.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="reviewTask" id="BPMNShape_reviewTask">
        <omgdc:Bounds height="55.0" width="105.0" x="125.0" y="190.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="reviewDecision" id="BPMNShape_reviewDecision">
        <omgdc:Bounds height="40.0" width="40.0" x="290.0" y="197.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="approved" id="BPMNShape_approved">
        <omgdc:Bounds height="55.0" width="105.0" x="390.0" y="97.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="rejected" id="BPMNShape_rejected">
        <omgdc:Bounds height="55.0" width="105.0" x="390.0" y="297.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
        <omgdc:Bounds height="35.0" width="35.0" x="720.0" y="307.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="approverapproved" id="BPMNShape_approverapproved">
        <omgdc:Bounds height="55.0" width="105.0" x="555.0" y="30.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="approverrejected" id="BPMNShape_approverrejected">
        <omgdc:Bounds height="55.0" width="105.0" x="555.0" y="162.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="587.0" y="104.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="65.0" y="217.0"></omgdi:waypoint>
        <omgdi:waypoint x="125.0" y="217.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="230.0" y="217.0"></omgdi:waypoint>
        <omgdi:waypoint x="290.0" y="217.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="310.0" y="197.0"></omgdi:waypoint>
        <omgdi:waypoint x="310.0" y="124.0"></omgdi:waypoint>
        <omgdi:waypoint x="390.0" y="124.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
        <omgdi:waypoint x="310.0" y="237.0"></omgdi:waypoint>
        <omgdi:waypoint x="310.0" y="324.0"></omgdi:waypoint>
        <omgdi:waypoint x="390.0" y="324.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="495.0" y="324.0"></omgdi:waypoint>
        <omgdi:waypoint x="720.0" y="324.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="660.0" y="57.0"></omgdi:waypoint>
        <omgdi:waypoint x="737.0" y="57.0"></omgdi:waypoint>
        <omgdi:waypoint x="737.0" y="307.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
        <omgdi:waypoint x="607.0" y="217.0"></omgdi:waypoint>
        <omgdi:waypoint x="737.0" y="307.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="495.0" y="124.0"></omgdi:waypoint>
        <omgdi:waypoint x="587.0" y="124.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
        <omgdi:waypoint x="607.0" y="144.0"></omgdi:waypoint>
        <omgdi:waypoint x="607.0" y="162.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="607.0" y="104.0"></omgdi:waypoint>
        <omgdi:waypoint x="607.0" y="85.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

<strong>workflow model</strong>

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



<model name="wf: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"/>

   </imports>



   <namespaces>

      <namespace uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>

   </namespaces>



   <types>



      <!–                               –>

      <!–  Basic Review & Approve Tasks –>              

      <!–                               –>



      <type name="wf:submitReviewTask">

         <parent>bpm:startTask</parent>

         <mandatory-aspects>

            <aspect>bpm:assignee</aspect>

         </mandatory-aspects>

      </type>



      <type name="wf:submitConcurrentReviewTask">

         <parent>bpm:startTask</parent>

         <properties>

            <property name="wf:requiredApprovePercent">

                <type>d:int</type>

                <mandatory>true</mandatory>

                <default>50</default>

                <constraints>

                    <constraint type="MINMAX">

                        <parameter name="minValue"><value>1</value></parameter>

                        <parameter name="maxValue"><value>100</value></parameter>

                    </constraint>

                </constraints>

            </property>

         </properties>

      </type>



      <!–  Submit review to multiple people (explicit list) –>

      <type name="wf:submitParallelReviewTask">

         <parent>wf:submitConcurrentReviewTask</parent>

         <mandatory-aspects>

            <aspect>bpm:assignees</aspect>

         </mandatory-aspects>

      </type>



      <!–  Submit review to multiple people (as included in a group) –>

      <type name="wf:submitGroupReviewTask">

         <parent>wf:submitConcurrentReviewTask</parent>

         <mandatory-aspects>

            <aspect>bpm:groupAssignee</aspect>

         </mandatory-aspects>

      </type>



      <type name="wf:reviewTask">

         <parent>bpm:workflowTask</parent>

         <overrides>

            <property name="bpm:packageItemActionGroup">

               <default>edit_package_item_actions</default>

            </property>

         </overrides>

      </type>



        <type name="wf:activitiReviewTask">

            <parent>bpm:activitiOutcomeTask</parent>

            <properties>

                <property name="wf:reviewOutcome">

                    <type>d:text</type>

                    <default>Reject</default>

                    <constraints>

                        <constraint name="wf:reviewOutcomeOptions" type="LIST">

                            <parameter name="allowedValues">

                                <list>

                                    <value>Approve</value>

                                    <value>Reject</value>

                                </list>

                            </parameter>

                        </constraint>

                    </constraints>

                </property>

            </properties>

            <overrides>

                <property name="bpm:packageItemActionGroup">

                    <default>edit_package_item_actions</default>

                </property>

                <property name="bpm:outcomePropertyName">

                    <default>{http://www.alfresco.org/model/workflow/1.0}reviewOutcome</default>

                </property>

            </overrides>

        </type>



      <type name="wf:approvedTask">

         <parent>bpm:workflowTask</parent>

         <mandatory-aspects>

            <aspect>bpm:assignee</aspect>

         </mandatory-aspects>

      </type>



      <type name="wf:rejectedTask">

         <parent>bpm:workflowTask</parent>

         <mandatory-aspects>

            <aspect>bpm:assignee</aspect>

         </mandatory-aspects>

      </type>



      <type name="wf:rejectedParallelTask">

         <parent>bpm:workflowTask</parent>

         <mandatory-aspects>

            <aspect>wf:parallelReviewStats</aspect>

         </mandatory-aspects>

      </type>



      <type name="wf:approvedParallelTask">

         <parent>bpm:workflowTask</parent>

         <mandatory-aspects>

            <aspect>wf:parallelReviewStats</aspect>

         </mandatory-aspects>

      </type>





      <!–                               –>

      <!–  Adhoc Tasks –>              

      <!–                               –>



      <type name="wf:submitAdhocTask">

         <parent>bpm:startTask</parent>

         <properties>

            <property name="wf:notifyMe">

               <type>d:boolean</type>

               <default>false</default>

            </property>

         </properties>

         <mandatory-aspects>

            <aspect>bpm:assignee</aspect>

         </mandatory-aspects>

      </type>



      <type name="wf:adhocTask">

         <parent>bpm:workflowTask</parent>

         <overrides>

            <property name="bpm:packageActionGroup">

               <default>add_package_item_actions</default>

            </property>

            <property name="bpm:packageItemActionGroup">

               <default>edit_package_item_actions</default>

            </property>

         </overrides>

      </type>



      <type name="wf:completedAdhocTask">

         <parent>bpm:workflowTask</parent>

         <mandatory-aspects>

            <aspect>bpm:assignee</aspect>

         </mandatory-aspects>

      </type>




   </types>



   <aspects>



      <aspect name="wf:parallelReviewStats">

         <properties>

            <property name="wf:reviewerCount">

               <type>d:int</type>

            </property>

            <property name="wf:requiredPercent">

               <type>d:int</type>

            </property>

            <property name="wf:approveCount">

               <type>d:int</type>

            </property>

            <property name="wf:actualPercent">

               <type>d:int</type>

            </property>

         </properties>

      </aspect>



   </aspects>



</model>

<strong>share-config form</strong>

<config evaluator="string-compare" condition="activiti$customactivitiReview">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
               <show id="wf:workDescription" />
               <show id="packageItems" />
               <show id="bpm:comment" />
                <show id="bpm:assignee" />
               <show id="bpm:sendEMailNotifications" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance=""
                  template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="work" appearance="title" label-id="workflow.set.work" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <set id="response" appearance="title" label-id="workflow.set.response" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />

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

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


               <field id="packageItems" set="items" />
               <field id="wf:workDescription" set="work" />
               <field id="bpm:assignee" label-id="workflow.field.assign_to"
                  set="assignee" />
               <field id="bpm:sendEMailNotifications" set="other">
                  <control
                     template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" />
               </field>

               <field id="bpm:comment" label-id="workflow.field.comment"
                  set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>


   <config evaluator="task-type" condition="wf:reviewTask">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="bpm:dueDate" />
               <show id="bpm:priority" />
               <show id="wf:workDescription" />
               <show id="packageItems" />
               <show id="bpm:assignee" />
               <show id="bpm:comment" />
               <show id="transitions" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance=""
                  template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
               <set id="work" appearance="title" label-id="workflow.set.work" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <set id="response" appearance="title" label-id="workflow.set.response" />


               <field id="message" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:dueDate" label-id="workflow.field.due" set="info" />
               <field id="bpm:priority" label-id="workflow.field.priority"
                  set="info">
                  <control
                     template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>

               <field id="packageItems" set="items" />

               <field id="wf:workDescription" set="work">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:assignee" label-id="workflow.field.assign_to"
                  set="assignee" />

               <field id="bpm:comment" label-id="workflow.field.comment"
                  set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
               <field id="transitions" set="response" />

            </appearance>
         </form>
      </forms>
   </config>

   <config evaluator="task-type" condition="wf:approved">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="bpm:dueDate" />
               <show id="bpm:priority" />
               <show id="wf:workDescription" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="transitions" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance=""
                  template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="work" appearance="title" label-id="workflow.set.work" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <set id="response" appearance="title" label-id="workflow.set.response" />


               <field id="message" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:priority" label-id="workflow.field.priority"
                  set="info" read-only="true">
                  <control
                     template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="packageItems" set="items" />

               <field id="wf:workDescription" set="work">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:comment" label-id="workflow.field.comment"
                  set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>

               <field id="transitions" set="response" />
            </appearance>
         </form>
      </forms>
   </config>


   <config evaluator="task-type" condition="wf:rejected">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="bpm:dueDate" />
               <show id="bpm:priority" />
               <show id="wf:workDescription" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="wf:reviewOutcome" />
               <show id="transitions" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance=""
                  template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="work" appearance="title" label-id="workflow.set.work" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <set id="response" appearance="title" label-id="workflow.set.response" />


               <field id="message" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:priority" label-id="workflow.field.priority"
                  set="info" read-only="true">
                  <control
                     template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="packageItems" set="items" />

               <field id="wf:workDescription" set="work">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:comment" label-id="workflow.field.comment"
                  set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>

               <field id="wf:reviewOutcome" set="response" />
               <field id="transitions" set="response" />

            </appearance>
         </form>
      </forms>
   </config>
   
   <config evaluator="task-type" condition="wf:approverapproved">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="bpm:dueDate" />
               <show id="bpm:priority" />
               <show id="wf:workDescription" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="transitions" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance=""
                  template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="work" appearance="title" label-id="workflow.set.work" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <set id="response" appearance="title" label-id="workflow.set.response" />


               <field id="message" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:priority" label-id="workflow.field.priority"
                  set="info" read-only="true">
                  <control
                     template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="packageItems" set="items" />

               <field id="wf:workDescription" set="work">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:comment" label-id="workflow.field.comment"
                  set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>

               <field id="transitions" set="response" />
            </appearance>
         </form>
      </forms>
   </config>


   <config evaluator="task-type" condition="wf:approverapproved">
      <forms>
         <form>
            <field-visibility>
               <show id="message" />
               <show id="bpm:dueDate" />
               <show id="bpm:priority" />
               <show id="wf:workDescription" />
               <show id="packageItems" />
               <show id="bpm:comment" />
               <show id="wf:reviewOutcome" />
               <show id="transitions" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance=""
                  template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="work" appearance="title" label-id="workflow.set.work" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
               <set id="response" appearance="title" label-id="workflow.set.response" />


               <field id="message" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:priority" label-id="workflow.field.priority"
                  set="info" read-only="true">
                  <control
                     template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:dueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="packageItems" set="items" />

               <field id="wf:workDescription" set="work">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>

               <field id="bpm:comment" label-id="workflow.field.comment"
                  set="response">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>

               <field id="wf:reviewOutcome" set="response" />
               <field id="transitions" set="response" />

            </appearance>
         </form>
      </forms>
   </config>

Outcomes