Quick Start

Un article de Bluexml.com.

Home Official WebSite Download Forum


This tutorial illustrates the use of BlueXML Developer Studio with the Alfresco generator. Firstly, we will present different tools used in this tutorial. Secondly, we will present the model's creation and finally the integration in Alfresco.


Download the Eclipse project


Sommaire

Tools and Installation

BlueXML Developer Studio

Of course, we use BlueXML Developer Studio. Our modeler and its functionnalities are Eclipse plugin. It is partially generated by TopCased which provide an approach to generate graphical editor from metamodel. So, it can be added to previous installation of Eclipse. Actually, you can only download a RCP version of Topcased includes all necessary plugins to use our modeler, it contains : Eclipse, TopCased, Acceleo, ATL... After you can update our installation with the update manager.

More information : here

Links :

Alfresco

With our editor, you can write models. To use this models, we provide only an Alfresco generator. Alfresco is the Open Source Alternative for Enterprise Content Management (ECM), providing Document Management, Collaboration, Records Management, Knowledge Management, Web Content Management and Imaging. We describe here few advice to install Alfresco.

First we work actually on the community version 2.9B . You can download this version as an EXE file here  :

You must install MySQL. After the MySQL installation, you must go in the folder <ALFRESCO_DIR>\extras\database\mysql and run the batch/sql file: db_setup.bat (which calls db_setup.sql)

You must go in the folder <ALFRESCO_DIR>\tomcat\shared\classes\alfresco\extension and move all files in a subfolder called backup per example.

You can now launch your Alfresco.

Links :

Alfresco Components

To improve the quality of the Alfresvo web client, we have created few components to install directly in the Alfresco installation. You must launch Alfresco firstly (the WAR file contained in the Alfresco installation must be extracted in the Alfreco directory, it's made during the launchin of Alfresco). You can download our components here :

This ZIP file contains a set of ZIP files. This contained files must be moved and extracted in this fodler <ALFRESCO_DIR>\tomcat\. You can re-launch Alfresco to verify the good installation of our components.

Model's creation

Links :

Project's creation

Eclipse is connected to a workspace (it can be choosed during the launching of Eclipse), it's a particular folder. This workspace contains one or more projects. Projects can be of different types (Java Project, Topcased Project, General Project). For this example, we create a TopCased Project. You select on the top menu bar : File > New > Project...

Image:Quick_start_menubar.gif

Next, we choose Topcased > Topcased Project and click on Next. On the next screen, we enter the project name. We call it Test and click on Finish.

Image:Quick_start_createproject_01.gif
Image:Quick_start_createproject_02.gif

Now we have a new project called Test which contains a subfolder called Models. Now we can create the model.

Image:Quick_start_createproject_03.gif

Model's creation

You click on the top menu bar : File > New > Other.... Now, you choose Topcased > Topcased Diagrams > BlueXML Diagram and you click on Next. In the next screen, you choose the directory (on our case, it's /Test/Models), the model name (myModel) and the template. The template is the type of the main diagram. A model can contain many diagrams. In our case, you choose Class diagram and you click on Finish.

Image:Quick_start_createmodel_01.gif
Image:Quick_start_createmodel_02.gif

We have an obl file which contains model and the obldi file wich contains the graphical visualization of this model. The result is :

Image:Quick_start_createmodel_03.gif

Package organization

It's highly recommended to organize model. So, we can create a hierarchy of package. For this example, we create this hierarchy : org > openbluelab > test. On the contextual menu of the root package in the outline view (the obldi file must be opened), we choose Create child > Package. We click on and change its name in the properties view. The root package must be named. Its name will be the prefix of model in Alfresco.

Image:Quick_start_createmodel_04_01.gif
Image:Quick_start_createmodel_04_02.gif

We use the same method to create the package openbluelab and the package test. On the contextual menu of the package test, we select Add diagram > Class diagram. The creation of this diagram permits to place model's element on the package test directly.

Image:Quick_start_createmodel_04_03.gif

Create elements

Now, we can create a class. We click on Class on the left panel. Next, click on the white part to create the class. We call it Contact. If we double-click on this class, we can set more additional informations as title, description, visual representation (we choose vertical tab on the options tab for visual-component).

Image:Quick_start_createmodel_05_01.gif
Image:Quick_start_createmodel_05_02.gif


We want now to add properties on this class. So click on Property on the left panel. Next, click on the class Contact. The new property can be modified if we double-click on. A new dialog appear and we can set additionnal informations.

Image:Quick_start_createmodel_05_03.gif
Image:Quick_start_createmodel_05_04.gif


We create 2 class Contact and Company. The contact has a first name and a last name. The company has only a name.

Image:Quick_start_createmodel_05_05.gif

Link elements

Now, we want to link our 2 classes. We click on Association on the left panel. Next, we click on the first class (Contact per example) and we click on the other class.

Image:Quick_start_createmodel_06_01.gif

We can double-click on the association and set properties on the dialog :

We obtain this result :

Image:Quick_start_createmodel_06_05.gif

Conclusion

We have created a package hierarchy, created a new diagram in the top package, added 2 classes with attributes and linked this 2 classes.

Image:Quick_start_createmodel_07.gif


It's important to note that BlueXML Developer Studio permits to generate completely workflows. Our modeler is similar to jBoss Process Designer but includes more functionnalities. You can have more informations here.

Alfresco generation

On the contextual menu of the obl file, you can click on Deploy Alfresco Configuration. It's recommended to choose to copy and not to publish (it's a new feature actually in test). To copy in Alfresco directory, you must set it in Eclipse preferences. We have a new folder called with the name of the prefix in the folder Alfresco Configuration. This folder contains 2 folders shared and webapps. This folders must be moved in the Alfresco installation folder (or copied during the deployment).

Image:Quick_start_generatemodel_01.gif
Image:Quick_start_generatemodel_02.gif

Integration of the Alfresco Generation

The folders shared and webapps must be merged with the Alfresco installation directory. We must move this folders in the folder <ALFRESCO_DIRECTORY>/tomcat. After relaunch Alfresco, you can create and link contact and company. You must connect to Alfresco and to go on your home space.

Image:Quick_start_integration_01.gif
Image:Quick_start_integration_02.gif


On the right part, you can create a new content by Create > Create content.

Image:Quick_start_integration_03.gif


You fill the name of the content and the type. First, we want to create a company. You click on Finish and fill the name of the company. The name of the company will be BlueXML. After we can clik on OK.

Image:Quick_start_integration_04.gif
Image:Quick_start_integration_05.gif


We have now create our company called BlueXML.

Image:Quick_start_integration_06.gif


We want now to create a new contact with the same method (Create > Create content) :

Image:Quick_start_integration_07.gif
Image:Quick_start_integration_08.gif
Image:Quick_start_integration_09.gif

This demonstration show a little example to use Alfresco. Our generator permits to make more actions. By example, we can consult the last contents added on the dashboard :

Image:Quick_start_integration_10.gif