% This file was converted to LaTeX by Writer2LaTeX ver. 0.4
% see http://www.hj-gym.dk/~hj/writer2latex for more info
\documentclass[12pt,twoside]{article}
\usepackage[ascii]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[magyar]{babel}
\usepackage{amsmath,amssymb,amsfonts,textcomp}
\usepackage{color}
\usepackage{calc}
\usepackage{hyperref}
\hypersetup{colorlinks=true, linkcolor=blue, filecolor=blue, pagecolor=blue, urlcolor=blue}
% Outline numbering
\setcounter{secnumdepth}{0}
% List styles
\newcounter{saveenum}
\newcommand\liststyleLi{%
\renewcommand\theenumi{\arabic{enumi}}
\renewcommand\theenumii{\arabic{enumii}}
\renewcommand\theenumiii{\arabic{enumiii}}
\renewcommand\theenumiv{\arabic{enumiv}}
\renewcommand\labelenumi{\theenumi.}
\renewcommand\labelenumii{\theenumii.}
\renewcommand\labelenumiii{\theenumiii.}
\renewcommand\labelenumiv{\theenumiv.}
}
\newcommand\liststyleLii{%
\renewcommand\theenumi{\arabic{enumi}}
\renewcommand\theenumii{\arabic{enumii}}
\renewcommand\theenumiii{\arabic{enumiii}}
\renewcommand\theenumiv{\arabic{enumiv}}
\renewcommand\labelenumi{(\theenumi)}
\renewcommand\labelenumii{(\theenumii)}
\renewcommand\labelenumiii{(\theenumiii)}
\renewcommand\labelenumiv{(\theenumiv)}
}
\newcommand\liststyleLiii{%
\renewcommand\theenumi{\arabic{enumi}}
\renewcommand\theenumii{\arabic{enumi}.\arabic{enumii}}
\renewcommand\theenumiii{\alph{enumiii}}
\renewcommand\labelenumi{ \theenumi.}
\renewcommand\labelenumii{ \theenumii.}
\renewcommand\labelenumiii{ \theenumiii)}
\renewcommand\labelitemi{{\textbullet}}
}
\newcommand\liststyleLiv{%
\renewcommand\labelitemi{[E00C?]}
\renewcommand\labelitemii{[E00C?]}
\renewcommand\labelitemiii{[E00C?]}
\renewcommand\labelitemiv{[E00C?]}
}
\newcommand\liststyleLv{%
\renewcommand\labelitemi{[E00C?]}
\renewcommand\labelitemii{[E00C?]}
\renewcommand\labelitemiii{[E00C?]}
\renewcommand\labelitemiv{[E00C?]}
}
% Pages styles (master pages)
\makeatletter
\newcommand\ps@Standard{%
\renewcommand\@oddhead{}%
\renewcommand\@evenhead{}%
\renewcommand\@oddfoot{}%
\renewcommand\@evenfoot{}%
\setlength\paperwidth{20.999cm}\setlength\paperheight{29.699cm}\setlength\voffset{-1in}\setlength\hoffset{-1in}\setlength\topmargin{2cm}\setlength\headheight{12pt}\setlength\headsep{0cm}\setlength\footskip{12pt+0cm}\setlength\textheight{29.699cm-2cm-2cm-0cm-12pt-0cm-12pt}\setlength\oddsidemargin{2cm}\setlength\textwidth{20.999cm-2cm-2cm}
\renewcommand\thepage{\arabic{page}}
\setlength{\skip\footins}{0.101cm}\renewcommand\footnoterule{\vspace*{-0.018cm}\noindent\textcolor{black}{\rule{0.25\columnwidth}{0.018cm}}\vspace*{0.101cm}}
}
\makeatother
\pagestyle{Standard}
\begin{document}

\bigskip

\subsubsection{Creating SSM in MagicDraw}

\bigskip

{\sffamily
Using the MagicDraw modeling and CASE tool one can develop MP{}-SSM{}-s
graphically, by drawing the corresponding SSM UML diagram and
transforming the exported data. Note that the data structures used in
the SSM and even the services themselves can be modeled in UML. }

{\sffamily
Currently it is a requirement for the data structures to have an UML
representation.}


\bigskip

\paragraph{Configuring MagicDraw}
{\sffamily
Before starting the design process, MagicDraw should be configured to
use the specialized profiles and plugins.}


\bigskip

\liststyleLi
\begin{enumerate}
\item {\sffamily
Copy the file SSMProfile.mdzip in
{\textless}MAGICDRAW\_HOME{\textgreater}/profiles.}
\end{enumerate}

\bigskip

\liststyleLi
\setcounter{saveenum}{\value{enumi}}
\begin{enumerate}
\setcounter{enumi}{\value{saveenum}}
\item {\sffamily
Copy the folder {\quotedblbase}MP SSM Diagram'' and its contents from
the distribution to the
{\textless}MAGICDRAW\_HOME{\textgreater}/data/diagrams directory. Edit
the descriptor.xml just copied and set the modules location for the
SSMProfile and UML\_Standard\_Profile correctly.}
\end{enumerate}

\bigskip

{\sffamily
Now (re)start MagicDraw.}


\bigskip

\paragraph{Creating the basic classes and interfaces}
{\sffamily
The complex (not primitive) datatypes and the service ports used in the
SSM have to be defined and accessible from MagicDraw. For this, }


\bigskip

\liststyleLii
\begin{enumerate}
\item {\sffamily
they can be defined in MagicDraw in the same project, in another
project, or}
\item {\sffamily
they can be imported in MagicDraw, from another case tool or, in the
future, from a WSDL file}
\end{enumerate}

\bigskip

{\sffamily
In this section we describe the first method.}


\bigskip

{\sffamily
The complex datatypes currently supported are literal enumerations and
classes, with a recursive definition for the class attributes (they can
be primitive types, literal enumerations and classes.) These should be
defined in standard class diagrams. In addition, for each service port
an interface has to be defined, which contains the methods published by
the service. In the case that you are going to generate the service
stubs from the model, you should apply some stereotypes here, and give
some additional information.}

\liststyleLiii
\begin{enumerate}
\item[] 
\bigskip
\end{enumerate}
{\sffamily
Create the interface and/or open its specification dialog. }


\bigskip

\liststyleLiv
\begin{enumerate}
\item {\sffamily
Set the {\quotedblbase}Applied stereotype'' property to
{\textless}{\textless}SSMInterface{\textgreater}{\textgreater} (defined
in SSMProfile)}
\item {\sffamily
Select the {\quotedblbase}Tags'' tab on the dialog. \newline
You will see in the first part of the right pane the list of tags
(properties) associated with the SSMInterface stereotype. By clicking
on a tag, its value will be displayed, if it has one, or you will get
the option to create a new value. \newline
For example, to assign a value to the {\quotedblbase}Namespace'' tag
property, click on the property, then choose the
{\quotedblbase}Create'' button. In the right part you can then enter
the namespace value. Clicking the {\quotedblbase}+'' button will set
the tagged value entered.}
\item {\sffamily
Now you can add the operations to the interface. For each operation, you
have to enter the following information in the specification:}

\begin{enumerate}
\item {\sffamily
On the General tab}

\begin{enumerate}
\item {\sffamily
Name}
\item {\sffamily
Applied stereotype: select
{\textless}{\textless}WebMethod{\textgreater}{\textgreater} (defined in
SSMProfile)}
\item {\sffamily
Type {--} should be set to the value of the return type of the call.
This is the type of the response message.}
\end{enumerate}
\item {\sffamily
Parameters tab\newline
Here you specify the parameters (of the input message). For each
parameter, you define the name, type and direction (in, out, inout or
return). Note: you have to define a parameter for the return value.}
\item {\sffamily
Tags tab\newline
On the {\textless}{\textless}WebMethod{\textgreater}{\textgreater} tag
group, optionally you can set:}

\begin{enumerate}
\item {\sffamily
inputMessage: the name of the input SOAP message associated with the
operation}
\item {\sffamily
outputMessage: the name of the corresponding output SOAP message}
\end{enumerate}
\end{enumerate}
\end{enumerate}

\bigskip


\bigskip

\paragraph{Creating the Service State Machine}
{\sffamily
To steps of creating an MP SSM diagram are the following:}


\bigskip

In the \textsf{Containment tree (Containment tab in the }\textsf{upper
side of the Browser}\textsf{) select the {\quotedblbase}Data'' folder,
or the folder in which you want to embed the SSM. From the context menu
(right click), select New Diagram {--} MP SSM Diagram. Alternatively,
from the Diagrams menu, choose Custom Diagrams {\textbar} \ MP SSM
Diagram.}

\textsf{If MP SSM Diagram is not found within the list of diagrams, then
MagicDraw was not configured correctly (see the section
{\quotedblbase}Configuring MagicDraw'').}


\bigskip

{\sffamily
If everything is Ok, a new SSM object is created and a new MP SSM
diagram is also built as its child object in the containment tree. You
can rename both the object and the diagram in the containment tree.}


\bigskip

{\sffamily
In the right pane, a new tab is created with an empty MP SSM diagram.
The middle toolbar will contain 2 button groups: Common and MP SSM. You
should draw the diagram using the shapes found here. There are 2 basic
shapes you will use: the State and the SSM Transition.}


\bigskip

{\sffamily
The State is a normal state used in standard state diagrams. We
represent here the states of the corresponding web service. A
synchronous request{}-response message is represented by 2 states,
corresponding to one request and one response transition.}


\bigskip

{\sffamily
The SSM Transition is a state transition having the
{\textless}{\textless}SSMTransition{\textgreater}{\textgreater}
stereotype applied. When creating such a transition (called also
{\quotedblbase}switch'' in SSM language), the following information
should be entered:}


\bigskip

\liststyleLv
\begin{enumerate}
\item {\sffamily
Operation (in the Trigger group)\newline
This is the operation used in the SOAP interface. To see this property,
first choose {\quotedblbase}CallEvent'' as the trigger EventType. Then
the operation \ should be selectable from the dialog (activated by the
right menu button on the value), as an operation of an SSMInterface
(defined at the class level, as discussed above)}
\item {\sffamily
Guard (in the Transition group)\newline
This is the guard of the transition. By opening the Edit dialog (with
the left{}-most button), you can write a large guard using a text box.
Choose Language = English. For better display, you might want to format
the text using new{}-lines.}
\item {\sffamily
In the {\quotedblbase}Tags'' menu (select Tags in the left tree), edit
the {\quotedblbase}kind'' and {\quotedblbase}update'' properties.}

\begin{enumerate}
\item {\sffamily
{\quotedblbase}Kind'' is the message kind, and a mandatory property. You
can choose a value of INPUT, OUTPUT or UNOBSERVABLE.}
\item {\sffamily
{\quotedblbase}Update'' represents the switch update command. Enter its
value as a string.}
\end{enumerate}
\end{enumerate}

\bigskip

{\sffamily
After creating the MP SSM diagram, export it in XMI for further use. It
is a good idea to create a directory first, where to save the files
exported by the project. Select File {\textbar} Export {\textbar} EMF
UML2 (v1.x) XMI. The files exported will be used by the Minerva tool to
build an SSM, which will be passed to Jambition for testing the web
service.}


\bigskip
\end{document}
