Wednesday, July 9, 2014

Alfresco Activiti Workflow Form - How to make Due date as Mandatory ?


How to make a field as Mandatory in workflow form?

Today I have asked to make, due date as Mandatory field in one our custom workflow form.
Just add, mandatory="true" in the field definition.


<config evaluator="string-compare" condition="activiti$MyWorkflow">
         <forms>
            <form>
               <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="packageItems" />
               <show id="bpm:assignee" />               
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
                
               <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/textfield.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" mandatory="true"/>
               <field id="packageItems" set="items" />   
            </appearance>
            </form>
         </forms>
   </config>

No comments:

Post a Comment