Alfresco Tech Talk Live #91 - Virtual Folders

14
Tech Talk Live Virtual Folders November 2015 Help shape our products: http://bit.ly/alfresco-research-signup

Transcript of Alfresco Tech Talk Live #91 - Virtual Folders

Page 1: Alfresco Tech Talk Live #91 - Virtual Folders

Tech Talk LiveVirtual Folders

November 2015

Help shape our products: http://bit.ly/alfresco-research-signup

Page 2: Alfresco Tech Talk Live #91 - Virtual Folders

2

Typical Problem Statements• „We have a folder structure by client but many departments work by

product so we have to jump back an forth between these folders. Also some clients are relevant for more than one product. Why can‘t we not just integrate clients into the product folders“

• More generic: Working with multiple entities (e.g. product, client, business unit)– We want to link them with each other– We want to integrate one entity folder into another entity‘s folder– Different users want to browse to find an entity by different criteria

• „We want to use meta data but the user experience to provide these is just too complex, everything needs to be very simple“

Problem

Statements

Page 3: Alfresco Tech Talk Live #91 - Virtual Folders

3

Virtual FoldersCapabilitiesFeatures Customer Value

The Epic,what is virtual folders?

Stored searches that are represented in a hierarchical folder tree, so that when a user enters a folder a query is executed and the results are displayed in a list.Combine the capabilties of search with a the well understood metaphor of folders:Find a document by what you are looking for, not where it is stored

Federate content View content distributed x-repository in a single view, avoid multi-filing and keep the link when moving content

Content in context Different users or a different business context require that a single document is available in different locations for browsing by different criteria

Auto classification & meta data propagation

Automatically classify a document when uploadingprovide metadata on content creation automatically without filling in a form

Process agility Apply on existing content, update at runtime & replicate structures easily

Generic Extends node & folder services – leverage in any UI or procotol*

*We advice to not use writing access via current protcol implemenations

Page 4: Alfresco Tech Talk Live #91 - Virtual Folders

4

Personas - Virtual Folders in the solution design process

Design WorkflowSpecifiy

Business Case

Usecases & Scenarios

Define& Implement

Domain Model

CustomData Model

Define& ImplementApplication

Virtual Folder Templates

Test

Deploy

Productize

Implementation

Deployment

Test

Transportation

Creating virtual folders is part of thesolution design workflow, typically doneby a business analyst or consultant role,moderate technical skills are required

End users will experience virtual foldersvery similar to normal folders

Page 5: Alfresco Tech Talk Live #91 - Virtual Folders

5

How to create a virtual folder hierarchyConfiguration{

"name" : „Claims by type","description" : „Insurance claims by

insurance class","nodes" : [{

"name" : „Accident Insurance",

"search" : { ... },

"filing" : { ... },... }, {"name" :

„Health Insurance", ... }, {"name" :

„Home Insurance",... }, { ...}]

„name“ : „My open claims“,…

„name“ : „Policy Documents“,…}

insurance.json

1. Create a Virtual Folder Template

2. Decide on a „Folder virtualization method“ – how to assign the templatea) Link a content type or aspect with a templateb) Associate the template using an aspect

Page 6: Alfresco Tech Talk Live #91 - Virtual Folders

6

Demo

Virtual Folders Demo

Demo

Page 7: Alfresco Tech Talk Live #91 - Virtual Folders

7

Artifacts of a Virtual Folder Configuration1. Prerequisit: Custom content model2. Create a Virtual Folder Template to define

– Queries for a hierarchical virtual folder tree– Filing rule for upload (type & physical storage location)– Property propagation rules for uploads

3. Choose a Folder virtualization method that defines– The method to associate a Virtual Folder Template with a folder– A rule to distinguish if a folder has virtual sub-folders

4. Implicit artifacts - typically no need to change– share-config-custom.xml to enable/disable actions– configure virtualization strategies: alfresco-global.properties– Virtualization model: vm:virtualization defines the required aspects

Configuration

Page 8: Alfresco Tech Talk Live #91 - Virtual Folders

8

Example: Virtual Folder TemplateConfiguration

{"name" : "Claim","nodes" : [{

"name" : "Application Forms","search" : {

"language" : "fts-alfresco","query" : "=ins:refClaimID:'<ins:claimID>'and =ins:docType:'application form'"

},"filing" : {

"path" : "%ACTUAL_PATH%","classification" : {

"type" : "cm:content","aspects" : [

"ins:insurance","ins:claimDoc„

]},"properties" : {

"ins:branch" : "<ins:branch>","ins:refClaimID" : "<ins:claimID>","ins:docType" : "application form"

}}

}, {"name" : "Assessments",

}, {"name" : "Correspondence",

}, ]}

Page 9: Alfresco Tech Talk Live #91 - Virtual Folders

9

3 Folder Virtualization Methods OOTB• Type virtual folders

– Template location: „Data Dictionary\Virtual Folder Templates“– Associate a template, implicitly by matching ist name with an object‘s type or aspect:

• <type_name>.json• <aspect_name>.json

• System virtual folders– Template location:

• <tomcat>\webapps\alfresco\WEB-INF\classes\org\alfresco\repo\virtual\node• „Data Dictionary\Virtual Folder Templates“

– To associate a template explicitly add an aspect to a folder:„System virtual folder“ (vm:system-virtualization)

• Custom virtual folders– Template location: upload to repository– To associate a template explicitly add an aspect to a folder:

„Custom virtual folder“ (vm:custom-virtualization)

Configuration

Page 10: Alfresco Tech Talk Live #91 - Virtual Folders

10

Share Action Configuration• Share actions are by default disabled for virtual folders, explicitly enable in:

– share-documentlibrary-config.xml– share-config-custom.xml

• New evaluators to enable actions in actionGroup configuration– DocumentEnableInVirtualFolder enable for documents in a virtual

folder– FolderEnableInVirtualFolder enable for folders in a virtual folder– VirtualFolderEnable enable for a virtual folder– FolderAndVirtualFolderEnable enable for folders & virtual folders

• Example<action index="100" id="document-download" appendEvaluators="true"><evaluator>evaluator.doclib.action.DocumentEnableInVirtualFolder</evaluator></action>

Share Actions

Page 11: Alfresco Tech Talk Live #91 - Virtual Folders

11

Configuration Parameters• Set Parameters in <tomcat>\shared\classes\alfresco-global.properties

• Enable or disable virtual folders completely:virtual.folders.enabled=true/false

• Classpath for system virtual folder templates:virtual.folders.config.system.templates.classpath=/org/alfresco/repo/virtual/node

• Company home relative name for system virtual folder templates:virtual.folders.config.system.templates.path=Data Dictionary/Virtual Folder Templates

• Content type of repository system templates.virtual.folders.config.system.templates.template.type=vm:virtualFolderTemplate

• Company home relative name for type mapped virtual folder templates:virtual.folders.config.type.templates.path=Data Dictionary/Virtual Folder Templates

• Model prefixes considered for aspect mapped virtual folder templates:virtual.folders.config.type.templates.aspect.prefix.filter=vm,clex

Configuration

Page 12: Alfresco Tech Talk Live #91 - Virtual Folders

12

Configuration – Constraints & best practice• Configure Alfresco search service must use Solr4• Alfresco search service must use DB "Use Database if possible” or “always"• Using FTS query language is a mandatory prerequisite for virtual folders.• Use transactional queries where possible• When defining a search query, restrict the query to certain types or aspects (using +TYPE

or +ASPECT), otherwise the query will search for all content.• No sync & cloud support still documents that are synced will show up in virtual folders• Do not use folder types in a filing rule, these are not supported yet• Do not create filing rules that don't match the query criteria for the folder (though if you

know the consequences this is still possible).• We advise against using protocols for write access, these may use atomic transactions to

create content (e.g. WebDAV):– Create an object– Retrieve the object– Upload contentThis will result in an error because step 2 cannot retrieve the object if the query doesn't match.

Best practice

Page 13: Alfresco Tech Talk Live #91 - Virtual Folders

13

Future BacklogFuture Backlog

Features Customer ValueEditor for virtual folders Speed up design and ramp up time, avoid mis-configuration

Enable departmental users/administrators to provide virtual folders for his team

Dynamic virtual folders - Facets

Filter on a certain property – automatically create a folder for each unqiue valueI want a folder for every customer / every year / every project

Folder creation I want to create a folder or a case-file in a virtual folderAnd classify the case on creation by inheriting all metadata to match the folder taxonomy

Custom columns I want to see business related data along with my documents, without having to open a dialogPrerequisit: Configurable table view is available by default in the doclib & repository

Other Clients & products Share, Mobile, SFS, Spa

Cloud 1. Sync allowed2. Virtual folders in the cloud (prerequisit: custom models)

Protocols & APIs I want to access virtual folder from Outlook, Windows Explorer, Mac Finder etc.Improve protocol support extend protocol implementations, WebDAV, CIFS, IMAP, FTP, CMIS

Virtual Document I want to create a master document (e.g. a validation plan) and link other documents as children

More action support Locate source, copy, move, edit permissions

Localization Localizable folder names support international use & process (backlog item)

Page 14: Alfresco Tech Talk Live #91 - Virtual Folders

Questions and Comments?