The PLASTIC Model to HUTN transformation tool UDA.

Post on 02-Apr-2015

217 views 2 download

transcript

The PLASTIC Model to HUTN transformation tool

UDA

http://www.ist-plastic.org - 2

PLASTIC Development Environment

http://www.ist-plastic.org - 3

Contents

This tutorial shows how it is possible to use the “PLASTIC Model to HUTN transformation tool” to generate HUTN files to be imported in the SLA editor once the service models have been completed

http://www.ist-plastic.org - 4

Roadmap

• Create a new Java project• Import the model

of the PLASTIC service• Run the UML2HUTN transformation• Import the generated HUTN file in

the SLAEditor

http://www.ist-plastic.org - 5

Create a new Java project (1/3)

http://www.ist-plastic.org - 6

Create a new Java project (2/3)

http://www.ist-plastic.org - 7

Create a new Java project (3/3)

Insert the project name (e.g.,"plastic.uml2hutn.tutorial")

http://www.ist-plastic.org - 8

Import the model of the PLASTIC service (1/5)

Create a new folder in the previously created project

http://www.ist-plastic.org - 9

Import the model of the PLASTIC service (2/5)

Specify the folder's name in the text area "Folder name" (e.g., "model")

http://www.ist-plastic.org - 10

Import the model of the PLASTIC service (3/5)

Right-click on the folder created in the previous step and shown in the "Package Explorer" (e.g., "model") and

click "Import” from the popup menù

http://www.ist-plastic.org - 11

Import the model of the PLASTIC service (4/5)

http://www.ist-plastic.org - 12

Import the model of the PLASTIC service (5/5)

Click “Browse” to browse the file system and specify the directory containing the EMF UML2 (v2.0) XMI encoding of the PLASTIC service model that has been exported by the “Service model editor”

http://www.ist-plastic.org - 13

Run the UML2HUTN transformation (1/3)

• Right-click on the .uml file of the PLASTIC service model exported through the “Service model editor” (e.g., “eHealth_Scenario.uml”) on the displayed popup menu

• choose the item “PLASTIC Model Transformations” -> “uml2hutn”

http://www.ist-plastic.org - 14

Run the UML2HUTN transformation (2/3)

http://www.ist-plastic.org - 15

Run the UML2HUTN transformation (3/3)

• A new directory, named “output_uml2hutn”, will be created in your project.

• It contains the hutn file corresponding to the input service model (“ehealth_Scenario.uml.hutn”) and another file (“thesis-combined.hutn”) which is always required by the SLAEditor to perform the import operation

http://www.ist-plastic.org - 16

Import the generated HUTN file in the SLAEditor (1/13)

Create a new folder in the project …

http://www.ist-plastic.org - 17

Import the generated HUTN file in the SLAEditor (2/13)

… and provides a name for it (e.g.“SLASpecifications”)

http://www.ist-plastic.org - 18

Import the generated HUTN file in the SLAEditor (3/13)

Right-click on the new created folder and select “New”->”File”

http://www.ist-plastic.org - 19

Import the generated HUTN file in the SLAEditor (4/13)

•Provides the name of the new file (e.g. sla1.plasticxmi)

• In order to edit this file through the SLA Editor, the extension of the file has to be “plasticxmi”

http://www.ist-plastic.org - 20

Import the generated HUTN file in the SLAEditor (5/13)

• Right-click on the new file and select “Open With” -> “Other”

http://www.ist-plastic.org - 21

Import the generated HUTN file in the SLAEditor (6/13)

• The “Editor Selection” window will be opened

• Select “SLAng Editor”

http://www.ist-plastic.org - 22

Import the generated HUTN file in the SLAEditor (7/13)

The editor is ready for

SLA specifications

http://www.ist-plastic.org - 23

Import the generated HUTN file in the SLAEditor (8/13)

• Right-click on the SLAng folder and select “Import HUTN”

• Browse the file system and point to the previously generated hutn file. It is located in the “output_uml2hutn“ folder in your current workspace

http://www.ist-plastic.org - 24

Import the generated HUTN file in the SLAEditor (9/13)

All the information in the HUTN file are imported in the “sla1.plasticxmi” file

http://www.ist-plastic.org - 25

Import the generated HUTN file in the SLAEditor (10/13)

Right-click on the SLA metaclass and select “Create object” in order to start with a new SLA specification

http://www.ist-plastic.org - 26

Import the generated HUTN file in the SLAEditor (11/13)

To specify the parties involved in the SLA being modeled, right-click on “parties” and select “Add reference”…

http://www.ist-plastic.org - 27

Import the generated HUTN file in the SLAEditor (12/13)

A new window will be opened showing all the available parties. Execute this step, for each party involved in the SLA

http://www.ist-plastic.org - 28

Import the generated HUTN file in the SLAEditor (13/13)

• In order to specify the service of the SLA being specified, right click on “services” and select again “Add reference”

• All the services that can be used for the SLA specification are shown in a window like this