AnsweredAssumed Answered

eFiles in eFile

Question asked by mkappel Employee on Jan 23, 2012
A common question is „Is it possible to get eFiles in eFiles listed?”
An example could be that you have an insurance contract file and of course in context of insurance there occur claims so you have also claim files.
A claim file can be only created when a corresponding contract file exists so a claim files has always a reference to a contract file (1:1)

[attachment=1]ClaimFiles.png[/attachment]

To one contract file multiple claim files can exist, therefor the contract file contains a folder which lists all related claim files (1:n)

[attachment=0]ContractFiles.png[/attachment]

Such a relation can be setup via the semi-virtual template. The semi-virtual template contains a folder listing all related claim files to its contract.
According to the following XML example the first folders are listing contract documents but the last folder respectively node defines a new search which allows you to setup a complete new search to retrieve different types of objects, in this case no documents but folders.


<?xml version="1.0" ?>
<VirtualFolderDescription>

   <root name="Contract File" containsdocs="true">

      <search versionselection="currentversion">
         
         <objectstores mergeoption="union">
            <objectstore name="Main Repository" />
         </objectstores>

         <from>
            <class symname="document" />
         </from>

         <select>
            <selectprops>
               <selectprop symname="Title" sortlevel="1" sortorder="ascending" />
               <selectprop symname="ContractNumber" />
               <selectprop symname="Status" />
               <selectprop symname="Responsible" />
               <selectprop symname="LastName" />
               <selectprop symname="Priority" />
               <selectprop symname="ResubmissionDate" />
               <selectprop symnaem="DocumentType" />
            </selectprops>
         </select>

         <where>
            <and>
               <eq>
                  <whereprop editproperty="hidden" symname="ContractNumber">
                  </whereprop>
                  <literal />
               </eq>
               <eq>
                  <whereprop editproperty="hidden" symname="DocumentType">
                  </whereprop>
                  <literal />
               </eq>
            </and>
         </where>
         <subclasses>
            <subclass objecttype="document" symname="ContractDocument" />
         </subclasses>

      </search>

      <node name="Policy" containsdocs="false">
         <refinecriteria>
            <literal symname="DocumentType">Policy</literal>
         </refinecriteria>
      </node>
         
      […]   
      
      <node name="Claim Files" containsdocs="true">
         <search versionselection="currentversion">

            <objectstores mergeoption="union">
               <objectstore name="Main Repository" />
            </objectstores>

            <from>
               <class symname="folder" />
            </from>

            <select>
               <selectprops>
                  <selectprop symname="Title" sortlevel="1" sortorder="ascending" />
                  <selectprop symname="ClaimNumber" />
                  <selectprop symname="Status" />
                  <selectprop symname="Responsible" />
                  <selectprop symname="RelatedContract" />
               </selectprops>
            </select>

            <where>
               <and>
                  <eq>
                     <whereprop editproperty="hidden" symname="RelatedContract">
                     </whereprop>
                     <literal />
                  </eq>
               </and>
            </where>
            <subclasses>
               <subclass objecttype="folder" symname="ClaimFile" />
            </subclasses>
         </search>
         <refinecriteria/>
      </node>
   </root>
</VirtualFolderDescription>                                    

The reference link in the first picture can be setup with a FieldControl delivered with OpenWorkdesk Enterprise Edition (see Configuration Guide chapter 8.1.3, available at http://openworkdesk.org/content/guides)

Outcomes