cancel
Showing results for 
Search instead for 
Did you mean: 

Share not rendering all custom field

darkredd
Star Contributor
Star Contributor
Good day all,

I am not sure if this will be the right place as this is part of workflows; however is the share config part.
I have a model defined which works fine when use directly in document library, however the share config of the workflow with the same properties does not show.

Here is my share config for the workflow:

   <config evaluator="string-compare" condition="activiti$psaregistrysystem">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="psa:seqID" />
               <show id="psa:source" />
               <show id="psa:recipient" />
               <show id="psa:reminderDate" />
               <show id="psa:email" />
               <show id="psa:cellphone" />
               <show id="psa:history" />
               <show id="mes:assignee" />
               <show id="packageItems" />
            </field-visibility>
            <appearance>
               <set id="info" appearance="Monitoring and Evaluation System" template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="items" appearance="title" label-id="Attachments" />
               
               <field id="bpm:workflowDescription" label-id="workflow.field.message" mandatory="true">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95px</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.dueDate" set="info" mandatory="true">
                  <control template="/org/alfresco/components/form/controls/date.ftl">
                     <control-param name="showTime" mandatory="true">true</control-param>
                     <control-param name="submitTime" mandatory="true">true</control-param>
                  </control>
               </field>
               
               <field id="mes:assignee" mandatory="true" set="info"/>
            <field id="psa:seqID" mandatory="true" set="info"/> //does not show on share
            <field id="psa:source" mandatory="true" set="info"/> //does not show on share
            <field id="psa:recipient" label-id="Recipient" mandatory="true" set="info"/>
            <field id="psa:reminderDate" label-id="Reminder" set="info">
              <control template="/org/alfresco/components/form/controls/date.ftl">
               <control-param name="showTime" mandatory="true">true</control-param>
               <control-param name="submitTime" mandatory="true">true</control-param>
              </control>
            </field>
            <field id="psa:email" mandatory="true" set="info" >
              <control template="/org/alfresco/components/form/controls/textfield.ftl" >
               <control-param name="style">width: 75px</control-param>
            </control>
            </field>
            <field id="psa:cellphone" mandatory="true" set="info" >
               <control template="/org/alfresco/components/form/controls/number.ftl">
               <control-param name="maxLength">10</control-param>                     
                  </control>
               </field>
               <field id="psa:history" label-id="History" mandatory="true" set="info" >
                  <control template="/org/alfresco/components/form/controls/textarea.ftl" >
                     <control-param name="style">width: 50px</control-param>
                  </control>
               </field>
               <field id="packageItems" set="items" mandatory="true" />
            </appearance>
         </form>
      </forms>
   </config>


All the field with prefix "psa" are defined elsewhere, only {psa:source, psa:recipient} which are persons objects; do not show on the form whereelse others do show.

Is there a particular way to add them to the form since they are associations on the defining model?:

<type name="psa:registry">
         <title>Document Type</title>
         <parent>cm:content</parent>
         <properties>
            <property name="psa:seqID">
               <title>SEQUENCE ID</title>
               <type>d:text</type>
            </property>
            <property name="psa:reminderDate">
               <title>Reminder Dates</title>
               <type>d:date</type>
            </property>
            <property name="psa:cellphone">
               <title>Contact Number</title>
               <type>d:int</type>
            </property>
            <property name="psa:email">
               <title>Email Address</title>
               <type>d:text</type>
            </property>
            <property name="psa:history">
               <title>History</title>
               <type>d:text</type>
            </property>
         </properties>
         <associations>
            <association name="psa:source">
               <title>Document Source</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>cm:person</class>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </target>
            </association>
            <association name="psa:recipient">
               <title>Document Recipient</title>
               <source>
                  <mandatory>false</mandatory>
                  <many>true</many>
               </source>
               <target>
                  <class>cm:person</class>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </target>
            </association>
         </associations>         
      </type>


I did try to add a person object defined in the same model as the WF model and that works perfectly.

Help much appreciated.
2 REPLIES 2

muralidharand
Star Contributor
Star Contributor
Hi,
You can try by adding force =true in the config section.

<show id="psa:seqID" force ="true"/>
<show id="psa:source" force ="true"/>

Here is the example, which I have used in my custom workflow.



      <config evaluator="string-compare" condition="activiti$TestWorkflow">
         <forms>
            <form>
               <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="packageItems" />
               <show id="bpm:assignee" />
               <show id="myCoWF:reviewer" />
               <show id="myCoWF:overAllResponsiblePerson" />              
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="SOP" appearance="Company SOP Details" label-id="SOP Details" template="/org/alfresco/components/form/3-column-set.ftl" />
               <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="packageItems" set="items" mandatory="true" >  
                    <control template="/org/alfresco/components/form/controls/workflow/packageitems.ftl">
                         <control-param name="itemType">cm:folder</control-param>
                    </control> 
               </field>
               <field id="myCoWF:sopNumber" label="SOP Number" set="SOP">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl">
                     <control-param name="maxLength">255</control-param>
                     <control-param name="style">width: 250px;</control-param>
                  </control>    
               </field>  
              
               <field id="bpm:assignee" label="SOP Author" set="SOP" />
               <field id="myCoWF:reviewer" label="Final Reviewer" set="SOP" />
               <field id="myCoWF:overAllResponsiblePerson" label="Overall Responsible Person" set="SOP" />
              
            </appearance>
            </form>
         </forms>
   </config>

Model:

         
          <type name="myCoWF:draftStartTask">
           <title>Draft, Review Approve Start Task</title>
           <parent>bpm:startTask</parent>
             <associations>
                <association name="myCoWF:reviewer">
                    <source>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </source>
                    <target>
                        <class>cm:person</class>
                        <mandatory>true</mandatory>
                        <many>false</many>
                    </target>
                </association>
                <association name="myCoWF:overAllResponsiblePerson">
                    <source>
                        <mandatory>true</mandatory>
                        <many>true</many>
                    </source>
                    <target>
                        <class>cm:person</class>
                        <mandatory>true</mandatory>
                        <many>false</many>
                    </target>
                </association>
            </associations>
            <mandatory-aspects>
                <aspect>bpm:assignee</aspect>             
            </mandatory-aspects>
          </type>




Please let me know, if it not helping you.

Hi Murali,

The "force" tag in the config works wonders, thanks for the info.