If you want to analyze your custom properties organized in types and aspect, starting from the A.A.A.R. v2.1 you can do it. This is possible on documents and folders (or both) and it’s particularly useful if you want to study better your workflows and specific environment.
As you probably know, Alfresco is able to extend it’s data model with one or more custom models. This is incredibly powerful because you can store your own metadata (called properties) together with your documents. Also the folders could be stored (and retrieved) together with custom properties.
So, once you have stored the documents and folder with success into your Alfresco, how to know how many of them are in a certain condition instead of another? How to develop and share reports and analytics about it?
Below a brief tutorial on how to develop it with A.A.A.R.
The solution is based on three step approach:
- Declare you custom types and aspects with some simple informations.
- Extend the A.A.A.R. data mart to store the informations from Alfresco.
- Extract and use your data from the data mart.
Below a brief description of each step.
ATTENTION: Perform those steps on a empty A.A.A.R. data mart! If you already have a working A.A.A.R. installation and want to know how to init the AAAR_DataMart, please read it here.
1. Declare types and aspects
With this step you declare the custom types and aspects you are going to analyze. This is the only configuration required and consists in a insertion of few simple informations in a database table, directly in the AAAR_DataMart. The table you have to populate is called AAAR_DataMart.dm_custom_metadata and you can manage it directly using your preferred database client.
Add exactly one row per Alfresco’s custom type or custom aspect. Below the meaning of each field and the instructions on how to evaluate it.
- Id. Do not evaluate it. An automatic sequence will do it for you once you will commit the row insertion.
- Name. Evaluate here the exact and precise name of you custom type or aspect. Example: acme:invoice, mycm:contract, ecc.
- Is_document_type. Possibile values: Y or N. Set it to ‘Y’ if what you set in the name field is a document type. Set it to ‘N’ otherwise.
- Is_folder_type. Possibile values: Y or N. Set it to ‘Y’ if what you set in the name field is a folder type. Set it to ‘N’ otherwise.
- Is_aspect. Possibile values: Y or N. Set it to ‘Y’ if what you set in the name field is an aspect (document or folder don’t mind). Set it to ‘N’ otherwise.
- Is_active. Possibile values: Y or N. Set it to ‘Y’ if want to extract informations about it to be analyzed. Set it to ‘N’ otherwise.
- Alfresco_id. Probably you have to set it to ‘1’. This field contains the Alfresco installation your custom type/aspect referrers to. By default you have to evaluate it to 1 according to the AAAR_DataMart.dm_dim_alfresco table.
Once the table is completed, you can go ahead to the next second and task where you are going to set the AAAR_DataMart structures with your custom tables.
2. Extend the data structures
Now that you have declared the types and aspects you want to analyze, it’s time to set up the AAAR_DataMart with some brand new data structures. With this operation you are going to create some custom tables used by the Pentaho jobs and transformations to store the custom data.
To perform this task, simply execute the ‘AAAR_Create_custom_structures’ script you can find in the ‘<biserver-ce>/pentaho-solution/system/AAAR/endpoints/kettle/script’ folder.
If no errors appear in the console: CONGRATULATIONS! You can go ahead to the next third and final task.
3. Extract your data and analyze
Now that everything is ready, you can run the AAAR_Extract script, as usual. Even multiple times, if you need. To understand how to do it, you can read here.