In this seven-step tutorial you’ll create a simple claims management solution.
You can use Smart Folders for any purpose where you want to bring together files from across an organization, and apply metadata across a set of files. A good case study is an insurance claim, where you might want to bring together information for one customer, that relates to a claim and a specific policy.
Note: You will need system administrator rights to perform the activities in this tutorial.
In the tutorial, you will:
clex_claimFolder.json Smart Folders TemplateSeePlan and implement Smart Folders andType-based, System, and Custom Smart Folders for more information about the Smart Folders workflow and types.
The diagram shows the final folder structure that you will create during this tutorial:
For background information on Smart Folder Templates, seeWhat’s a Smart Folder?
To set up the claims framework, you need to create a custom content model, then create a folder structure for your content.
You need a custom content model to specify the metadata that the claims solution requires. You need to be in the ALFRESCO_MODEL_ADMINISTRATORS group to create a content model. For detailed information about Model Manager, seeContent modeling with Model Manager.
Download theSmart Folders tutorial files from thesmartfolders-master/tutorial directory.
You can download a zip of the Smart Folders master directoryhere.
In Alfresco Share, selectAdmin Tools andModel Manager to display the Model Manager page.
ClickImport Model and browse tosmartfolders-master/tutorials in yourDownloads directory toimport claims_example.zip, and clickImport.
You’ll see theclaims_example model and namespace, with a status of Inactive.
SelectActions andActivate to set the status to Active.
Clickclaims_example to see the Custom Types and Aspects that are defined for the model.
ClickSites andCreate Site. Create a new site calledSmart Folders, and clickSave.
SelectDocument Library and create a new folder for the tutorial calledSmart Folders Tutorial.
In the Smart Folders Tutorial folder, create a folder calledClaims Application, and sub folders calledClaims and Policies. You should see this structure:
You’re now ready to configure your claim.
To configure the claims framework, add the sample template to the Data Dictionary and enable the claims aspect.
The example data model that you imported in the previous task contains theclex:claimFolder aspect. This aspect defines the metadata for a claim, and also marks a folder as being used to contain claim information. Make sure that you’ve downloaded theSmart Folders tutorial files before proceeding with this task.
Stop Alfresco Content Services, and edit youralfresco-global.properties file to specify the following settings:
smart.folders.enabled=true smart.folders.config.type.templates.qname.filter=clex:claimFolderThesmart.folders.config.type.templates.qname.filter property specifies the custom type or aspect of the contents of the Smart Folder Template.
Restart Content Services.
Browse to smartfolders-master/tutorials in your Downloads directory, and locate theclex_claimFolder.json file.
This is the Smart Folder Template.
This file matches theclex:claimFolder aspect, so that any folder type with theclex:claimFolder aspect applied to it should use theclex_claimFolder.json Smart Folder Template for its folder structure.
Adding this aspect and Smart Folder Template means that you’re using Type-based Smart Folders.
In Alfresco Share, click Repository then Data Dictionary, and copyclex_claimFolder.json into the Smart Folder Templates folder.
You’ll see the defaultsmartFoldersExample.json Smart Folder Template is already in this folder.
Note: You need system administrator rights to upload this file.
You’re now ready to create a new claim.
You can create a simple folder rule to add an aspect automatically to your folder structure.
To simplify the creation of a claim folder, you can create a folder rule to add the clex:claimFolder aspect automatically to any new claim folder.
Upload theaddAspect_claimsFolder.js file fromsmartfolders-master/tutorials in your Downloads directory to theRepository > Data Dictionary > Scripts directory in Alfresco Content Services.
This file provides additional function that is not available in the standard aspect and property settings.
Click the site Document Library and drill down to theSmart Folders Tutorial > Claims Application folder.
It’s important that you create the rule for theClaims folder so that all sub folders will have the aspect that marks them as a claim.
Click theClaims folder and from the menu, clickMore thenManage Rules, andCreate Rules.
Give the rule a name (Add Claims Folder aspect) and a description (Adds clex:claimFolder aspect and converts folder to a claim structure). Use the following options for the remaining fields:
addAspect_claimsFolder.js fileNote: Make sure that these options are not selected:
- Rule applies to subfolders
- Run rule in background
When you’re done, clickCreate.
You can create a new claim structure using the Smart Folder Template, and edit a new claim.
Click the site Document Library and drill down to theSmart Folders Tutorial > Claims Application > Claims folder.
Create a new folder calledInsurance Claim.
If you didn’t set up arule to add the aspect:
Hover over theInsurance Claim folder and selectMore thenManage Aspects.
In theSelect Aspects window, add the Claim Folder (clex:claimFolder) aspect, and clickSave .
Hover over theInsurance Claim folder, selectEdit Properties andAll Properties.
You’ll see a new section calledClaim Details that’s been populated from the Claim Folder aspect.
Claim Number, Policy Number, Claim Type, Claim Status, Handling Administrator, and Claim Date fields are visible. Specify a unique claim number (and other data) in these fields, which are propagated to any file in this folder. A list of numbers is provided for testing.
Select the default numbers, a claim type of Accident Insurance and note the claim number. ClickSave .
Return to Document Library. You’ll see the new Smart Folders are shown as sub folders of theInsurance Claim folder.
Smart Folders are identified by this icon:
You can now add some files to your claim.
Add some files for the new claim.
You can add any files you like to the site Document Library for your claim. For convenience, an image (in JPG format) and a claim form (in PDF format) are provided in:Smart Folders tutorial files.
Click the site Document Library and drill down to theSmart Folders Tutorial > Claims Application > Claims > Insurance Claim folder.
Drag and drop any image (or the image fromSmart Folders tutorial files into theAssessments folder.
Look in theAssessments/Images folder. The image you added is shown there. The image property defines that it must be filed in theImages folder.
Hover over the image and clickEdit Properties thenAll Properties to view the Claim Details.
The image has inherited the Claim Number that you set up when you create the folder, and it has inherited the Assessment file type, because this is the folder where the file was dragged to. The file status is set toDraft by default.
Change the Document Type to Correspondence. The image is viewable in theCorrespondence Smart Folder.
Change the Document Status toIn Review. The image is viewable in theReview processes/2_In Review Smart Folder.
You can look at theclex_claimFolder.json file contents to understand the search criteria being applied to each folder. SeeSmart Folder Template syntax for more guidance on understanding and creating your own templates.
Add a claim form (you can use the form fromSmart Folders tutorial files to the Forms Smart Folder.
Hover over the claim form and clickEdit Properties thenAll Properties to view the Claim Details.
The form has inherited the Claim Number that you set up when you create the folder, and it has inherited the Claim Form file type, because this is the folder where the file was dragged to. The file status is set to none by default.
You’ve set up a claim structure, and learned how to configure it with a template, create a new claim folder, and populate it with content.
You can use multiple Smart Folder Templates at the same time, to help you find your content more easily.
You can add System or Custom Smart Folders to your structure to use alongside the Type-based Smart Folders that you’ve already applied.
In Alfresco Share, click Repository and Data Dictionary, and copyclaimsApplication.json fromSmart Folders tutorial files into the Data Dictionary/Smart Folder Templates folder.
You’ll see thesmartFoldersExample.json sample file (and any other templates you’ve added) already in this folder.
Select theclaimsApplication.json file. In Document Actions selectChange Type and selectSmart Folder Template as the new type, and OK.
Click the site Document Library and drill down to the Smart Folders Tutorial folder.
Hover over theClaims Application folder and from the menu selectMore thenManage Aspects. Add the System Smart Folder (smf:systemConfigSmartFolder) aspect, and clickSave .
Adding this aspect allows you to select a Smart Folder Template that is in the Data Dictionary/Smart Folder Templates directory.
Alternatively, select the Custom Smart Folder (smf:custom-ConfigSmartFolder) and select a template from anywhere in your repository.
Note: You can add a single template only to a folder. If you select both the System Smart Folder (
smf:systemConfigSmartFolder) and Custom Smart Folder (smf:customConfigSmartFolder) aspects, the system aspect overrides the custom aspect.
Hover over the Claims Application folder and from the menu selectEdit Properties andAll Properties.
In the Smart Folder Template field, select theclaimsApplication.json Smart Folder Template.
If you need to navigate to the template, it lives inRepository > Data Dictionary > Smart Folder Templates.
In the site Document Library, click theClaims Application folder.
You’ll see the new folder hierarchy displayed, showingClaims by type,My open claims, andPolicy documents. These Smart Folders are displayed in addition to the Smart Folders we set up under theClaims Application folder.
You can add files relating to the policy and review the Smart Folder structure that you’ve created for managing claims.
We’ve already created a new claim in previous steps, and built up the Smart Folder structure as part of the tutorial. In a real life scenario, the policy files would be created first, and the claim files linked to them afterwards. You can add any files you like to the Document Library for your policy. For convenience, a Terms and Conditions file and a policy file (in PDF format) are provided in the zip package:Smart Folders tutorial files.
Click the site Document Library and drill down to theSmart Folders Tutorial > Claims Application > Policies folder.
You created a new Accident Insurance claim in the previous steps, and now you’re going to add some policy files to the Accident Insurance type.
Drill down to thePolicy Documents > Accident Insurance folder.
Drag and drop a Terms and Conditions file into the Terms & Conditions Smart Folder.
SeeSmart Folders tutorial files for an example file.
Drag and drop a Policy file into the Insurance Contracts Smart Folder.
SeeSmart Folders tutorial files for an example file.
Edit the properties of the Policy file.
Hover over the policy file, and from the menu clickEdit Properties andAll Properties. You’ll see aPolicy Details section, where you can set the Document Type, Policy Number and Insurance Class. If you specify a certain policy number, this must be specified in any subsequent claims that you create in the Claims folder.
Try creating a new folder inClaims, with a unique claim number, unique policy number (relating to your new policy file) and insurance class (Accident Insurance, in this case).
The diagram shows the final folder structure that you’ve set up for your claims management:
