Custumize a workflow form

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

Custumize a workflow form

Hello, i want to custumize a workflow form, specifically to hide the 'workflow due date' field. I have tried to customize the share-workflow-form-config.xml ( replacing the '  <show id="bpm:dueDate" />  ' with '  <hide id="bpm:dueDate" />  ' in visibility block but no results. I would appreciate if anyone could help me.

 

Thanks in advance.

5 Replies
Highlighted
Senior Member II

Re: Costumize a workflow form

First of all , it seems that you are directly customizing inside the installation.You should never do that at all in any situation.

Read out documentation for improving that part.

You can override this form in share-config-custom.xml. Remove the field which you want to hide and it will work.

Highlighted
Member II

Re: Costumize a workflow form

I copied the following script to share-config-custom.xml in order to hide the 'duedate' field from the start of a workflow

but it doesn't work. sorry for disturbing but i'm stuck and cant find a solution.

----------------------------------------------------------------------------------------------------------------------------

   <config evaluator="string-compare" condition="wf:submitReviewTask" replace="true">
      <forms>
         <form id="workflow-details">
            <field-visibility>
               <show id="bpm:sendEMailNotifications" />
               <show id="packageItems" />
              <hide id="bpm:workflowDueDate" /> 
            </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="packageItems" set="items" />
            </appearance>
         </form>

         <form>
            <field-visibility>
               <show id="message" />
               <show id="taskOwner" />
               <show id="bpm:workflowPriority" />
            <hide id="bpm:workflowDueDate" />
               <show id="bpm:taskId" />
               <show id="bpm:status" />
               <show id="packageItems" />
               <show id="bpm:sendEMailNotifications" />
            </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="packageItems" set="items" />
               <field id="bpm:sendEMailNotifications" set="other" />
            </appearance>
         </form>
      </forms>
   </config>

----------------------------------------------------------------------------------------------------------------------


 

Highlighted
Established Member

Re: Costumize a workflow form

For more info on how to hide default properties in form refer the comments below on given link.

https://community.alfresco.com/message/826204-re-how-to-remove-workflow-default-alfresco-properties-...

Highlighted
Member II

Re: Costumize a workflow form

thanks

Highlighted
Established Member

Re: Costumize a workflow form

You should either use show element or hide element. If you want to hide workflow due date from workflow start form, then remove the code you copied and paste the following into share-config-custom.xml.

<config evaluator="string-compare" condition="activiti$your_ProcessID">

      <forms>

         <form>

            <field-visibility>

                <hide id="bpm:workflowDueDate" />  

            </field-visibility>

         </form>

      </forms>

    </config>

Change condition with your processID given in process definition file.