[AAT] Chapter 3: Node Browser
Welcome to the third chapter of this tutorial. During this post we are going to review what is Node Browser on Alfresco, what we can do, in which cases we are going to use it and much more.
Aren’t you excited?
What is it?
Sometimes client reports an issue with Alfresco such like: “I cannot find my document.” As Alfresco administrator you should be able to see what is happening inside the box and analyse the problem. Logical steps are:
- Check logs – Logs are always you friend but perhaps you have no warn or error indeed.
- Check user trash can – Maybe this user just deleted the document and it can be recover with an admin account.
- If the previous suggestions do not work, check Node Browser to understand what is behind this issue.
Node Browser is a tool used to navigate in Alfresco in a non-friendly UI and approach the information in a rudimentary way similar to querying database directly. It is one of the most powerful alfresco administrator tool, let us show you how to use it 😉
Before start, some basic knowledge…
Store & UUID
Almost everything you have created in Alfresco is a node. One document is one node. One user (person) is a node, etc… Each node has its own node reference (like its unique ID) which is the noderef we have copied. This node reference is composed by two parts:
- Store: Each store is an area of the repository and, within each one of this, the nodes are organized hierarchically. On the node reference, the store is that part such like workspaceSpacestore. Depends on your Alfresco version you have different options, but most common are:
- workspace://SpacesStore – Nodes are “alive” on your Alfresco. Means, you can edit them, manage them, work with and use them.
- archive://SpacesStore – When nodes are deleted, internally they will be stored and marked as “archive”. This action will keep it on the system certain period of time (giving you the possibility to find them on user trash can). After this period, the nodes will be permanently deleted and you won’t be able to restore them again.
- Others…
- UUID: It is the unique identifier per each node and it is alphanumeric.
Example:
- If you can edit your document (so, the document is “alive”), node reference will be composed like this:
workspace://SpacesStore/9a09408b-e6f5-4e22-a828-85ea570f63fd
- Otherwise, if you have already deleted your document, node reference will be like:
archive://SpacesStore/9a09408b-e6f5-4e22-a828-85ea570f63fd
Now, we know better what we have in front of us, let’s continue with the tutorial.
Let’s practice!
Imagine you have just received this kind of email: “I have a problem with My amazing document.” What a wonderful coincidence! Time to use Node Browser to verify everything is all right behind of it.
First part: Get reference to work (test data)
- Launch your alfresco
- Open Share
- Login as admin (or with an user admin account)
- Go to one site, in my case we’ll use Sample: Web Site Design Project
- Go to Project Library (aka Document Library), click on Create > Plain Text like this one:
- Click on “Create”
- On right menu, click on Manage Aspects, locate Versionable click on “+” button:
Note: With this option, our document will be versionable by other people (control version). - Click on “Apply changes” button.
- Once the aspect is applied successfully on the document, please copy the url on the top and save in a good place because we will work with it:
Second part: Launch the console
- On the top, click on Admin Tools, on left menu, click on Node Browser:
- Do you remember the url from our document, we need it now. This is mine and yours will be similar:
http://localhost:8080/share/page/site/swsdp/document-details?nodeRef=workspace://SpacesStore/9a09408b-e6f5-4e22-a828-85ea570f63fd
We will need last part, starting byworkspace:....
- Copy and paste it into the console, you should have something similar to this picture below:
- Click on search, here is my result:
- Click on the name.
Third part: Analyse the result
Let’s see what we have here, block by block:
- About. This section describes general node properties such its own reference, path where it’s located, which type is it and its parent.
- Properties. These are properties which belong to your node. If you have implemented a custom type with custom properties, everything will be reflected here.
- Aspects. Aspects are groups of properties which can be applied to types, no matters if it’s Alfresco native types (cm:folder, cm:content, etc..) or your own custom type. We can see in this section our Versionable aspect applied.
- Children. If node has children, the reference will appear here. For example, if you have a folder and has children, all references will be here.
- Parents. Parent of this node.
- Associations.
- Source Associations. Points 6 & 7, you can create custom associations between different types here in Alfresco.
- Permissions. – One of the most interesting parts of this information because you can see here who or which group have permission to see, edit, etc.. this node.
Note: Check “Useful links” part of these tutorial to see more info about types, associations etc…
In which cases can help us?
- User can not find a document
- No permission properly applied on nodes
- If there is a problem with a property (like value null) you will be able to find it
- More problems related with nodes
EXTRA TIP: In addition, you can launch queries to search by different protocols, not only search by node reference:
Good point here is, once you have identified which problem has the node, you are able to write your own javascript using the Javascript Console explained in our previous chapter, and fix it.
Useful links
- Alfresco base knowledge. Info about nodes, references, etc…
- Custom content models. Info about properties, associations, etc…
- You have more examples in official book Alfresco 3 Cookbook (here you can find a useful review).
- Using the Node Browser Video – By Carlos Miguens
- Node browser in action by Jeff Potts
- Search in Alfresco
As you see, this console has many different possibilities that makes easier, for sure, all the daily work of an Alfresco administrator.
We hope you’ve learned with us some useful administrator tricks. Please stay tuned for next chapter.