AnsweredAssumed Answered

Modifying a workflow form

Question asked by vferia15 on Sep 20, 2011
Latest reply on Mar 16, 2012 by paiyyavj13
Hi everybody

I'm testing Alfresco Share workflow Adhoc WorkFlow  (Activiti).
I want to modify the form wf:submitAdhocTask in file share-workflow-form-config.xml in ALF_HOME\tomcat\webapps\share\WEB-INF\classes\alfresco.

I want to include a new property bpm:comment in wf:submitAdhocTask, here is the extraction with comment included

   <config evaluator="task-type" condition="wf:submitAdhocTask">
      <forms>
         <form id="workflow-details">
            <field-visibility>
               <show id="wf:notifyMe" />
               <show id="packageItems" />

            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.workflow.more_info" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <field id="wf:notifyMe" />
               <field id="packageItems" set="items" />
           
            </appearance>
         </form>
        
         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:taskId" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="wf:notifyMe" />
    <show id="bpm:comment" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.task.info" />
               <set id="info" appearance="" template="/org/alfresco/components/form/3-column-set.ftl" />
               <set id="progress" appearance="title" label-id="workflow.set.task.progress" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
              
               <field id="message">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="taskOwner" set="info" />
               <field id="bpm:taskId" set="info">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info" read-only="true">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:workflowDueDate" set="info" label-id="workflow.field.due">
                  <control template="/org/alfresco/components/form/controls/info.ftl" />
               </field>
               <field id="bpm:status" set="progress" />
               <field id="wf:notifyMe" set="other" />
               <field id="packageItems" set="items" />
               <field id="bpm:comment" label-id="workflow.field.comment" >
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>


My issue is that it doesn't work, it doesn't appear in form till I include bpm:comment also in the work flow definition activiti$activitiAdhoc at the beginning of the file.

   <!– Activiti Ad Hoc Workflow Definition –>
   <config evaluator="string-compare" condition="activiti$activitiAdhoc">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:assignee" />
               <show id="packageItems" />
               <show id="wf:notifyMe" />
    <show id="bpm:comment" />
            </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="assignee" appearance="title" label-id="workflow.set.assignee" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
              
               <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="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
               <field id="packageItems" set="items" />
               <field id="wf:notifyMe" set="other" />
            <field id="bpm:comment" label-id="workflow.field.comment" >
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" />
               </field>   
            </appearance>
         </form>
      </forms>
   </config>

What is wrong with this?


Another question, if I modifiy the file  share-workflow-form-config.xm in  \tomcat\shared\classes\alfresco\web-extension it doesn't modify the form.
I have checked that catalina.properties contains the line shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

Could anybody help me?

Best regards

Outcomes