Follow sidelabs on Twitter

SIDE-ALPHA:BlueXMLDeveloperStudio Manual

From SIDE-Labs.org

User's Guide Version 1.0 for BlueXML Developer Studio version 1.4.3

Last revised: February 2008

Manual in construction

Contents

Introduction

Installation guide

You can install BlueXML Developer Studio using :

This chapter describes the installation procedures for:

  • Alfresco
  • BlueXML Modules for Alfresco

Installing Alfresco

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 work on the community version 2.9B . You can download this version as an EXE file here:

You can now launch your Alfresco.

Links :

Installing BlueXML Modules for Alfresco

To improve the quality of the Alfresco 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 launching 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 folder <ALFRESCO_DIR>\tomcat\webapps\alfresco. You can re-launch Alfresco to verify the good installation of our components.

Update guide

This chapter presents the update procedures for:

  • BlueXML Developer Studio
  • BlueXML Modules for Alfresco

Updating BlueXML Developer Studio

To update BlueXML Developer Studio follow the steps below:

1. Select Help > Software Updates > Find And Install....

TopcaseUpdate.JPG

2. In the Install/Update window, choose Search for new features to install and click Next.

OMF Manual UpdateManager01.jpeg

3. Select BlueXML Update in the list of update sites and click Finish.

UpdateBDS.JPG

4. Wait until the search is finished. Select the features to be updated and click Next.

OMF Manual UpdateManager03.jpeg

5. After accepting the license agreements click Next.

Updatelicense.JPG

Then click Finish.

UpdateInstall.JPG

6. In the window Verification, click on the Install All button to begin the installation. A restart of Topcase will be needed before using the plugin.

UpdateVerification.JPG

Updating BlueXML Modules for Alfresco

Follow the same steps as in the installation of the BlueXML Modules for Alfresco.

BlueXML Developer Studio General Features Guide

In this chapter you will learn about the basics features of BlueXML Developer Studio. You will learn how to create and edit a class diagram, a use case diagram, a security diagram, and a workflow diagram.

Introducing to BlueXML Developer Studio

This part describes the main capabilities and concepts of BlueXML Developer Studio.

What is BlueXML Developer Studio?

BlueXML Developer Studio is a real development environment in which you can create, edit, manage and communicate on models. BlueXML Developer Studio permits, for the moment, to create 4 diagrams :

  • Class Diagram
  • Use Case Diagram
  • Security Diagram
  • Workflow diagram

What other features are available ?

  • A performant IDE to manage models through search, validation, visualization, documentation publication
  • Models transformations to import from UML1 and UML2 to BlueXML and to export from BlueXML to UML 1 and UML 2
  • Generators to get forms, documentation or applications
  • A collaborative IDE to create, edit, update and share models among a team

BlueXML Developer Studio User Interface

The user interface is organized into 4 parts:

  • A main window which is used to edit or to create the model.
  • A navigator view which shows the files and folders of the project
  • A outline view which displays the structure of the model (packages, class, association...)
  • A properties view which shows the properties of a selected object.

The user interface is shown in the following figure.

BLUEXMLDS.JPG

Getting started

Project's creation

Eclipse (or Topcase) enables you to create different types of projects (Java Project, Topcased Project, General Project). In this guide we will work with Topcased, so we will create a TopCased Project. To create your project, you have to select on the top menu bar : File > New > Project...

Quick start menubar.gif

Next, you need to choose Topcased > Topcased Project and click on Next. On the next screen, you will enter name of your project. For example, you can call it Test and click on Finish.

Quick start createproject 01.gif
Quick start createproject 02.gif

Now you have a new project called Test which contains a subfolder called Models.

Quick start createproject 03.gif

Configuration

To configure BlueXML Developer Studio, select Window > Preferences.... The preferences of BlueXML Developer Studio are grouped under the category called BlueXML Developer Studio.

PeferenceBDS.JPG

If the option Highlight attributes if constraints (figure above) is enabled then all the attributes having meta-information will be highlight on the main window (showing the graphical view of a diagram). For example, in the following figure the attribute Name of the class Compagny has a meta-information specifying that it is required.

HighlightOption.JPG

Under the category BlueXML Developer Studio there are two sub-categroy:

  • Alfresco Generator enables you to define configuration and add new configuration for the Alfresco generator. A configuration specify the URL to access to Aflresco and the installation directory of Alfresco. If you select the option Is default configuration your configuration will be the default one when you will use the Alfresco generator


PeferenceAG.JPG


PreferenceNConf.JPG


PreferenceNConfM.JPG


  • Modeler Parameters enables to specify delete actions : Do not ask for confirmation before deleting graphical elements and Do not ask for confirmation before deleting model elements


PeferenceMP.JPG

Model's creation

To create a model follow the steps given below:

1. Click on the top menu bar : File > New > Other....

NewOther.JPG

2. Choose Topcased > Topcased Diagrams > BlueXML Diagram and click on Next.

Quick start createmodel 01.gif

3. In the next screen, choose the directory (on our case, it is /Test/Models), the model name (myModel), and the template. The template is the type of the main diagram. With BlueXML Developer Studio you can create 4 different kind of diagram: BPM Diagram, Class Diagram, Security Diagram, and UC Diagram. A model can contain many diagrams. After choosing the type of diagram you will need, click Finish

Quick start createmodel 02.gif


The result is :

Quick start createmodel 03.gif

Different kind of files

BlueXML developer Studio use 3 different kind of files:

  • an OBL file which contains the model. It is a simple XMI file with all the data. An extract of an OBL file is shown below:
<?xml version="1.0" encoding="UTF-8"?> 
<MMUseCase:Package xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" 
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                   xmlns:MMUseCase="http://MMUseCase" xmi:id="_TnQCYKb7Edyg0-Q2ek6f8g" name="crm">
  <packageSet xmi:id="_V_-0UKb7Edyg0-Q2ek6f8g" documentation="" name="com">
  <packageSet xmi:id="_XPZ00Kb7Edyg0-Q2ek6f8g" name="bluexml">
  <packageSet xmi:id="_YWL2sKb7Edyg0-Q2ek6f8g" name="sem">
  <packageSet xmi:id="_blBKMKb7Edyg0-Q2ek6f8g" name="crm">
  ...
  <classSet xmi:id="_nYP48KcBEdyjnooseSwyow" documentation="" name="Project"
                title="Projet" description="" associations="_-ww3gKcBEdyjnooseSwyow">
     <comments xmi:id="_mZTqccjtEdyC9JwX7EOdEA" stereotypes="_yXB5sKcMEdy1ioBnpUnfzA" value="{Projet},name"/>
     <metainfo xmi:id="_r8Zu4dWLEdy_g5UDd75T2w" value="VerticalTab" key="visual-component"/>
     <attributes xmi:id="_oOVMYKcBEdyjnooseSwyow" documentation="" name="startDate" typ="Date" 
                                                          title="Date de début" description=""/>
     <attributes xmi:id="_okis8KcBEdyjnooseSwyow" documentation="" name="endDate" typ="Date" 
                                                         title="Date de fin" description=""/>
     <attributes xmi:id="_oy_YoKcBEdyjnooseSwyow" documentation="" name="name" typ="String" 
                                                                 title="Nom" description="">
         <metainfo xmi:id="_bwh58NPaEdyjn5pDRsG5lg" value="True" key="required"/>
     </attributes>
     <attributes xmi:id="_pwPEAKcBEdyjnooseSwyow" documentation="" name="description" typ="String" 
                                                             title="Description" description="">
         <metainfo xmi:id="_zkw5IKcBEdyjnooseSwyow" value="30" key="textarea-cols"/>
         <metainfo xmi:id="_zkw5IacBEdyjnooseSwyow" value="5" key="textarea-rows"/>
     </attributes>
  </classSet>
  ....
  </packageSet>
</MMUseCase:Package>
  • an OBLI file which contains the graphical representation of the model. This file is automatically linked to an OBLI file which means that a modification of the graphical representation will be automatically reflected on the real model (contained in the OBL file).
  • a REF file allows to build an overall model.

Package organization

It is highly recommended to organize the model. Follow the steps provided below to create the hierarchy org > openbluelab > test:

1. In the navigator view, select the OBLDI file.

TopCaseNavigatorView.JPG

2. In the outline view, select the root package.

3. Enter the name org in the properties view. All package must have a name because its name will be the prefix of model in Alfresco.

TopCaseOutlineView.JPG

4. Choose Create child > Package in the outline view.

TopCasePackageAdd.JPG

5. Enter the name openbluelab in the properties view.

6. Repeat 4. and 5. to create the package test

7. On the contextual menu of the package test, select Add diagram > Class diagram. The creation of this diagram allow to place model's element on the package test directly.


TopCasePackageTest.JPG

Meta-information

The meta information are additional information added to the model in order to specify constraints. There is a list of constraints defined by BlueXML Developer Studio. To specify a constraint you will just need to select it in the property window of an element. You will find in the following table the list of all constraint and which element they are associated.


Type of the element Constraint Name Possible value Description
Class treeNode Boolean
Attribute size Integer width of the field
Attribute required Boolean Input in the form is required
Attribute hidden Boolean Field hidden in the form
Attribute treeNodeName Boolean
Attribute tree Boolean + String
Attribute type = String email Boolean Verification of the email syntax
Attribute type = String rte-rows Integer Number of line for a text area Rich Text Edit (with a possible formatting)
Attribute type = String rte-cols Integer Number of column for a text area Rich Text Edit (with a possible formatting)
Attribute type = String rte-width Integer Width for a text area Rich Text Edit (with a possible formatting)
Attribute type = String rte-height Integer Height for a text area Rich Text Edit (with a possible formatting)
Attribute type = String textarea-rows Integer Number of line for a text area Rich Text Edit (without a possible formatting)
Attribute type = String textarea-cols Integer Number of column for a text area Rich Text Edit (without a possible formatting)
Operation type {button,action}
Association asList Boolean Representation with a list
Use case layout-renderer-name {window,nowindow,borderless_window} Graphical representation of the portlet
Use case Col Stereotype accessible conform to the regular expression Col[0-9]* Selection of the column where the portlet will be
Use case ColDef Stereotype accessible conform to the regular expression ColDef:[[0-9]+,]*[0-9]+ Selection of the layout of the portlets in a level

Creating Class Diagram

In this part you will learn about the proprieties of every objects of a class diagram.

Toolbox

The Class Diagram Toolbox is used to create objects and links between objects on a class diagram. This toolbox is shown in the following figure:

BDSToolbox.JPG

To add an object to a class diagram, click on the required icon and put it on the diagram. Set an object name and its properties by double clicking on this object.

To add a link, click on the required icon. In the class diagram, click on the first end object and drag to the second end object. Set a link name and its properties by double clicking on this link

To delete an object or link from the class diagram, right-click the object or link and select Delete From Diagram or Delete From Model . If you choose Delete From Diagram you still can see the object or link in the outline view, because the object or link is only deleted from the graphical view.

Class

To edit the properties of a class, you have to double click on the required class in the main window. It will open the following windows:

Classproperties.JPG

The table below gives an overview of the properties of a class.

Tab Field Description
General Name Name of the class
Title Name display in the menu of Alfresco
Description Description of the class. In alfresco when you move your cursor near the icon of the class the description will be displayed.
Is abstract Specifies if it is an abstract class or not
Is deprecated Specifies if the class is deprecated or not
View Specifies how an instance of a class will be display in Alfresco. Example for a class "Society" with 2 attributes: Name, Adress
Layout Specifies the layout of the attributes of a class. Example for the class Contact:

[ [{firstName},{lastName}], [{surname}, {title}], [{language}], [{contacts}] ]

Aspects Organisation This enables to organize the aspect linked to the class
Options isContainer If Checked, it will create under Alfresco a Space. If not, it will create a content
visual-component If nothing is selected the attribute of the class will not be separated from the attributes of the aspects linked to the class in Alfresco

Separator: add a separator between the attributes of the class and the attributes of the aspects in Alfresco

HorizontalTab: Displays the attributes in a horizontal tab (A tab for the attribute for the attributes of the class, a tab for each aspect linked to the class)

VerticalTab: Displays the attributes in a vertical tab (A tab for the attribute for the attributes of the class, a tab for each aspect linked to the class)

Documentation Enables to write documentation


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).

Quick start createmodel 05 01.gif
Quick start createmodel 05 02.gif

Aspect

An aspect is a collection of attributes. To link an aspect to a class use the link Include Aspect. An aspect can be linked to one or many classes.


Tab Field Description
General Name Name of the aspect
Title Name display in the menu of Alfresco
Description Description of the aspect. In alfresco when you move your cursor over the aspect name the description will be displayed.
Layout Specifies the layout of the attributes of the aspect.

Enumeration

A description of the properties of an Enumeration object is given below:

Tab Field Description
General Name Name of the enumeration element
Value Enables to add value to the enumeration element

There are two ways to add value to an enumeration element:

  • you can use the tab Value of the enumeration.
  • you can click on the element Enumeration Literal, then click on your enumeration element.

Property

There is a description of each property of an attribute in this part.

Attributeproperties.JPG


Tab Field Description
General Name Name of an attribute.
Type Type of an attribute: boolean, byte, char, double, float, int, long, short, String, void, Date, Object.
Visibility Specifies if the attribute is private, protected or public.
Title Name display in Alfresco
Short description Short description of the attribute.
Value List Specifies if the attribute is linked to an enumeration element. When you will create an instance, this attribute will have fixed value.
Options email If yes is selected, Alfresco will verify if the input value for this attribute is an email
regular-expression Alfresco will verify if the input value follow the regular-expression.
size size of the field in Alfresco
required If yes is selected, an input for this attribute will be required
hidden If yes is selected, the attribute will be hidden in Alfresco
read-only If yes is selected, the user can not change the value of this attribute
propertySearched If yes is selected, user will be able to search a class through value of this attribute.
multiple If yes is selected, it will be possible to add mutiple value to this attribute in Alfresco
textarea-rows Defines the number of rows of the text area
texarea-cols Defines the number of columns of the text area
min-length Defines the minimum length of the input value
max-length Defines the maximum length of the input value


We want now to add properties on the class Contact. 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.

Quick start createmodel 05 03.gif
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.

Quick start createmodel 05 05.gif

Operation

To add an operation to a class use the object Operation of the toolbox.

OperationObject.JPG


Tab Field Description
General Informations Name Name of the operation
Return type Specify the type of the return value: boolean, byte, char, double, float, int, long, short, String, void, Date, Object.
Visibility Specifies if the operation is private,public or protected.
Is static Specifies if the operation is static or not.
Parameters Specifies the name and type of parameters of an operation.
Documentation Documentation of the operation

Stereotype

The stereotype element enables you to specify a value. There is no property associated with this element. Double click on the element in the main window to enter a name.

To link a stereotype to a class use the link Is stereotyped.

Stereotypeobject.JPG

Comment

To create a comment element, click on the comment icon of the toolbox and put it in your main window. Double click on the element to enter your comment.

To link a comment to a class use the link Is commented

Commentobject.JPG
Commentobject2.JPG

View

The table below gives a description of each properties of a view element:

Tab Field Description
General Name Name of the view element
Description Description of a view.
Attributes Enables you to specify the class (Container field) and the attributes (Attribute field) you want to display in your view. It will create a template in Alfresco.

To add a view element, click on the view icon of the toolbox and drag it to the main window.

Viewobjectproperty.JPG


To add Attributes to your view follow the steps below:

  1. Create a link between your view and your class by using the icon Has view of the toolbox.
Viewobject.JPG
  1. In the Attributes tab of your view, click Add.
  2. Click in the first empty cell of the column Container to select your class and click on the first empty cell of the column Attribute to select an attribute of the class
Viewobject3.JPG
Viewobject4.JPG
  1. Repeat the step 2. to add others attributes
Viewobjectattribute.JPG



Association

A description of each properties of an association link is given in the following table:

Tab Field Description
General Association name Name of the association
Title Specifies the name displayed in Alfresco
Association Type There are 3 different types of association: Simple, Composition, and Aggregation.
Association first end Role Name given to the role of the association first end
Is navigable Specifies the navigability of the association
Lower Bound Specifies the lower bound of the participating object
Upper bound Specifies the upper bound of the participating object
Association second end Role Name given to the role of the association second end
Is navigable Specifies the navigability of the association
Lower Bound Specifies the lower bound of the participating object
Upper bound Specifies the upper bound of the participating object


Now, we want to link the classes Contact and Compagny. 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.

Quick start createmodel 06 01.gif

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

Quick start createmodel 06 02.gif
Quick start createmodel 06 03.gif
Quick start createmodel 06 04.gif

We obtain this result :

Quick start createmodel 06 05.gif

Association Class

Follow the steps provided below to create an association class:

  1. Add a class called Date with two attributes: DateBegin and DateEnd
Associationclass1.JPG
  1. Click on the icon Is association class of the toolbox. In the class diagram, click on the association workIn and drag to the class Date.
Associationclass2.JPG

Creating Use Case Diagram

Toolbox

UCToolsbox.JPG

Creating Security Diagram

Toolbox

CSToolsbox.JPG

Creating Workflow Diagram

Toolbox

BPMToolsbox.JPG

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).

Quick start generatemodel 01.gif
Quick start generatemodel 02.gif


The relation association class is not implemented in Deploy Alfresco Configuration because Alfresco (version 2.9B) doesn't have this relation.

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.

Quick start integration 01.gif
Quick start integration 02.gif


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

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.

Quick start integration 04.gif
Quick start integration 05.gif


We have now create our company called BlueXML.

Quick start integration 06.gif


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

Quick start integration 07.gif
Quick start integration 08.gif
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 :

Quick start integration 10.gif