Home
Minerva - User Manual - PLASTIC Validation Framework
Contents
1. Figure 1 Creating a new project emmer DataType Product QuoteRequest PAPER product Product PEM quantity int CAT Address Quote tirsthame String lasthame String street String city String zipcode rt Country String SUP double Figure 2 The basic types and data structures 4 2 Modeling the types and data structures The Warehouse example contains the following user defined types Product Address Quote and QuoteRequest These are shown in Fig 2 We model these types in a class diagram 1 From the elements browser pane on the left choose then right click Warehouse 002 Service View Structural View 2 Select New Diagram Class Diagram and specify a name Warehouse Types 3 Add the type elements to the diagram using the Class and Enumeration shape buttons on the diagram toolbar found in the Class Diagram button group First create the enumeration called Product On the Class Diagram toolbar click the arrow found at the right side of the Class button then select Enumeration fig 3 Create the enumeration by clicking on the canvas Then open the specification dialog and set the name Product and the desired values For the values click Enumeration Literals on the left pane of the specification dialog then press the Create button for each String literal you want to add Specifying a name for a literal is enough Next create the classes
2. We ll follow the steps of modeling the Warehouse service described in the Jambition chapter with an SSM using MagicDraw 4 1 Creating the project First we create a Plastic project e From the File menu choose New Project The New Project dialog box opens 1 Select the Project from Template icon 2 Specify the name e g Warehouse in the Name text box 3 Choose the Project Location 4 Select Plastic Template from the templates available and click Ok fig 1 Click on the lt Top Level Service Name gt in the Containment browser and rename it to Warehouse choose Rename from the context menu obtained by right clicking the name The created Plastic project contains the necessary module imports Plastic Profile and UML Standard Profile and a package structure already based on the Plastic Conceptual Model containing the 5 basic views For the SSM we are interested mainly on the Service View which consists of a Structural View and a Behavioral View Next we need to model the composite and other user defined types which will be used through the project Lj New Pro ject D Blank Use Case SF Project Project Project location workspace projects d create directory for project and related data Project i KEE tary be Boh SE EE From Template Select template DACH DDL DA EJE AH Java El MOF DAC RUF AM Use Case modeling DAC WAE DAC WSDL e E Schema nal Plastic Template Template description e 2007 11 14
3. similarly For each class specify the Name Applied Stereotype and the class Attributes To set the stereotype click on the Value cell of the Applied Stereotype line in the specification dialog Then click the small rectangle button on the right side labelled This will open a list box containing all stereotypes which can be applied to the element Typing d the list will be filtered to the stereotypes starting with d in our case the list will contain only one element Data Type defined in the Plastic Profile Select this element with the check box and click Apply fig 4 Next define the class attributes Select Attributes in the left browser tree of the specification dialog then hit Create The following data should be specified for each attribute L DEBO e E F ws awlAquilal Ware L Cont f Ga UML Standard Profile UML_Standard_Profile xml DE Warehouse GL 001 Requirements View B E 002 Service View B f Behavioral view B E Structural view i a Service Description Diagram GI 003 Components View DCH 004 Implementation View fF 005 Deployment View OA Plastic Profile Plastic Profile mdzip EI MagicDraw UML 14 0 Warehouse mdzip F wspaceVessy MagicDraw Aquila Signal Data Type Primitive Type Class by Pattern Figure 3 Creating an enumeration Dy MagicDraw UML 14 0 Warehouse mdzip F wspaceVessy MagicDraw Aquiia pia Tat A joteReques
4. Down Clone Delete Forward Figure 13 Location variables in the SSM 13
5. E ALISA RL fq_return price 0 0 amp amp Transitionkind e INPUT ro Felurnp refhlumber OJ transitionKind QUTPUT update qi rq_teturn dl eS SM States gt 3 J Figure 12 The SSM diagram in MagicDraw Location variables have to be defined as attributes of the SSM In the containment browser right click the SSM object and select Specification In the specification dialog on the left pane select Attributes Then create each variable with the Create button A name and a type should be specified The type can be selected from a dialog like all other parameter types In our case we have 2 location variables qr and qi fig 13 4 6 Exporting the SSM After having created the model we have to export it for further use Because there will be one file exported for each sub module the Warehouse project will be exported in 17 files Create a directory when the output will be stored then select File Export EMF UML2 v1 x XMI After selecting the output directory the project will be exported 12 p State Machine Warehouse 55M Loi Warehouse 55M aE Documentation Hyperlinks Cal Sttributes E Bl gi Warehouse 002 EZ GC gr Warehouse 002 5 EI general w ST QuoteRequest Warehouse 002 5er 3 Warehouse 5 Es X qi E Quote Warehouse 002 Service View Warehouse 5 E Eag Behaviors So Template Parameters GES Inner Elements Eaa Relations o Tags ae Constraints hor Up
6. Minerva User Manual Zsolt Kiss Gere January 28 2008 Contents 1 Minerva Overview 1 2 Technical info 1 3 Deployment 2 SINT CC UNENEE 2 32 COnnguresUsage 20246 2 6 os 2n eo A Dee Geek 5 Shee hee SKE E 2 4 Tutorial 2 At Creating tne PrOjeCt hk exh en eee ars amp SAE oe aE eee ere re SS E 2 4 2 Modeling the types and data structures onono 4 4 3 Creating the service description a o o oa aoao a a a a a a a 7 4 4 Creating the Service State Machine 8 45 ILO Cation Vanables 4 22 4 4c6o e 2 bbe Bie oo hee eS RARE REE SEES ARES 10 4 6 Exporting the SSM 44 2 42468 4444 8 lt 0 4 44 50008 64 4 bu e be wee ee he 12 1 Minerva Overview Minerva is a tool for using SSM models designed in MagicDraw in the testing environment of Jambition It reads such models and converts them to an internal representation suitable to be used by Jambition to test a web service It also contains showWSDL and other library utilities called by Jambition in order to accomplish its validation and testing activities 2 Technical info Provider 4D Soft Lid Introduction Minerva is a library containing the following services e showWSDL This is a tool which parses a WSDL document and outputs its structure in a human readable format e getSSMFromwsDL This command takes a WSDL document and an SSM XML description and creates an internal representation of the SSM passing it to Jambition for testing a web service e getSSMFromUML This
7. call takes an XMI file containing an UML representation of an SSM model and generates an internal SSM used further by Jambition for testing and validating a web service Development status The currently available version is 2 0 Intended audience Software developers who wish to validate and functionally test their services designed conform to the SP SSM model and modelled with the MagicDraw UML tool License This software is open source GPL version 3 license is used Language Java Environment set up Minerva runs in a Java environment so a Java 5 or higher Runtime Environment is needed in order to use it The libraries used are open source and packaged with the installation Because it is a library for Jambition a Jambition installation is also needed There are no special hardware or software requirements beside this Platform Java Runtime Environment 5 or later Download http plastic isti cnr it download tools Documents Javadoc API this guide Contact Zsolt G Kiss zsolt kiss 4dsoft hu 3 Deployment 3 1 Install To install Minerva unzip the archive showWSDL zip in a directory of choice referred later as SMINERVA_HOME in this document 3 2 Configure Usage The java version gt 5 0 should be in the PATH other configuration is not needed The used libraries are contained in the package ShowWSDLElements tool usage 1 Change directory to SMINERVA_HOME 2 Type java jar showWSDL jar lt wsdl uri gt 4 Tutorial
8. eRequest af Warehouse El checkovaill rr Warehouse 002 Service Views Structural View ii El torderShipment ref int addr Warehouse 002 Service Views G cancelTransactk refhumber ink J CE Product ware houseTypes d Service Description Diagram Components view P C 004 Implementation view eae pa 005 Deployment view DE Plastic Profile Plastic Profile mdzip DE ee Cane PO _return product qr produck Bi rg_return quantity qr quantity Bc rg_return price gt 0 0 amp amp rg return refNumber gt 0 Cancel Figure 11 Editing a guard 11 Tat i in EE aon ES RE DE aa i ga Service Description Diag ww le Warehouse 55M Diagram Les WarehouseTypes ES State Machine Diagram 455M Diagram O States 455M5tate gt gt set Lees i a ES i seSSMStater gt 7 Transition lt lt S5MTransition gt gt 3 1 SS ae ae d SS initialState checkAyvaill r QuoteRequest 1 Guote r aquantity 0 i i transition Kind INPUT update qr r checksyvaill r GuoteRequest 1 Quote rq_return product qr product SS rq return quantity 0 SE ro return price 0 0 SS rq_return rerhlumber 0 cancelTransact refNumber inti ref girefNumber transitionkind INPUT e lt SSMStater gt checkAvall r GuoteRequest gt Guote d L ES Se i fq_return product gr product SS lt order Shipment ret int addr Address il fa Herel Ant SU
9. empty Service Description Diagram created by the Plastic template Double click it in the elements browser to open the diagram for editing Select the Service Description button in the diagram toolbar and click in the canvas to create a new Service Description this is the service interface Open its specification dialog and enter Warehouse for the name Then choose Operations on the left browser pane and add the necessary operations For each operation we should define the following e Name e Kind REQUEST_RESPONSE ONE_WAY NOTIFICATION or SOLICIT RESPONSE e Parameters For each parameter we should specify e its name e type primitive or user defined as discussed above and e direction in out inout or return Note you have to define a parameter for the return value which has to be unique between all parameter names eg rqg_return and not just return After defining the service description the service diagram will look like in fig 7 EI SE UML 14 0 WarehouseO mdzip F wspaceVessy WagicDraw Aquila as i Fie Edit eg aan Diagrams Options Tools GE Teamwork Window Ge e SCH 6 Sy Fe 2 TETT IA Aio vinan package Structural View EN Service Description Diagram J HER UML Standard Profile UML_Standard Profile B E Warehouse E Fj 001 Requirements View Service Description Di Service Description DE 002 Service view 7 Service Composition s lt ServiceDescription D E ZC Beha
10. s is the message kind For the first transition from 1 2 choose INPUT Guard This is the guard of the transition r quantity gt 0 for the 1 2 transition By opening the Edit dialog with the right most button you can write a large guard using a text box Choose Language English For better display it is recommended to format the text using new lines which are stripped out during the analysis In fig 11 you see the guard format of the transition from state 2 3 Update Represents the switch update command usually a simple assignment For the 1 2 transition it is grer Create all transitions in the same manner For a better visual experience you can arrange the label positions in a convenient way For some transitions e g 2 1 and 3 1 some manual formatting of the arrows is also desirable in order to produce a decent looking diagram After the SSM is modeled its diagram would look like similar to fig 12 4 5 Location variables When setting the guard and update statements you might have noticed that there were used some new variables which were not operation parameters These are the so called location variables which record the state of a conversation 10 Ki Select Element l lt none gt LES Data ffe UML Standard Profile UML Standard Drofide ml BHR Warehouse ELE 001 Requirements view ELE O02 Service View ELE Behavioral view El Structural View E E Address E Quote Quot
11. t Structural View Warehouse 002 Servi E Template Parameters E Inner Elements DataType Class Plastic Profilen Specifications Figure 4 Applying a stereotype e Name e Type For the type there is also a context sensitive list box which filters by the first entered characters For the primitive types use the UML Standard Profile MagicDraw Profile datatypes package After defining the classes needed by the Warehouse project the class diagram will look like in fig 5 elei UML 14 0 Warehouse mdzip F rg ee ei Zant Standard Profile D Standard Profil Zi E E Warehouse G E 001 Requirements view Si 7002 Service View H E Behavioral view E Structural view GL Address es Quote D QuoteRequest 9 Product ee WarehouseTypes in Service Description Diagram 6 ZC 003 Components view Si 004 Implementation view Ei 005 Deployment View EH Plastic Profile Plastic Profile mdzip Figure 5 The warehouse types diagram The next step is the specification of services For this the Service Description Diagram will be used 4 3 Creating the service description Next we create the service fig 6 seServiceDeecrigtion Warehouse WSpecification checkAvall QuoteRequest Quote kind REQUEST RESPONSE peretionSpecificetion gt cancelTransact refNumber int kind ONE WAY Figure 6 The service In the Service Structural View there is already an
12. tty amp amp rg return price UI SES i rq return Freihumber 0 corderShipmentt ref int addr Address Il ret girethumber ttransitionkind INPUT transitiankind QUTPUT Update qi rq_teturn sSSMState 3 3 a Figure 8 The service state machine diagram 1 From the elements tree browser pane on the left choose then right click Warehouse 002 Service View Behavioral View 2 Select New Diagram JSSM Diagram At this point MagicDraw has done the following it created an SSM called Untitled and an SSM Diagram underneath as a child element called also Untitled1 To rename the elements right click on each of them and choose Rename from the context menu Double clicking on the newly created diagram name will open the diagram window The toolbar will have a group called USSM Diagram with 2 shape buttons State lt lt SSMState gt gt and Transition lt lt SSMTransition gt gt We create the diagram using these element types The SSMState is a very simple element We specify its name usually a number and if it is the initial state we set its initialState property to true This property can be found under Tags under the lt lt SSMState gt gt group listed at the bottom Select the tag initilaState then press the Create Value button After double clicking the Value check box on the right the value is set fig 9 For the other states it is not necessar
13. vioral View 7 Service Usage EL E Structural View FR lt lt OperationSpecification gt checkAvail r QuoteRequest 1 Quote kind REQUEST_RESPONSE Warehouse fe Address ssOperationSpecification gt gt orderShipment ref int addr Address kind ONE WAY E Quot lt lt OperationSpecification cancelTransact refNumber int Hkind ONE WAY F uote SET TT GE QuoteRequest er Warehouse Product E WarehouseTypes i l VW Service Description Diagram i l ZC 003 Components view i Si 004 Implementation view BL 005 Deployment View Da Plastic Profile Plastic Profile mdzip ki TS L ET Fl Properties a Figure 7 The service diagram Then we can move on specifying the services dynamic behavior with the SSM 4 4 Creating the Service State Machine Now follows the most interesting part of the design specifying the SSM We define this by drawing an SSM diagram which will look like in fig 8 We will create an SSM for our Warehouse service ftransitionkKind INPUT update qr 1 Check r GuoteRequest J Quote rq return product gr product SS rq return quantity 088 rq_return price UU SS rq_return refMumber 0 ftransitionkind OUTPUT cancelTransact retfumber iint ref qiuretNumber EE ftransitionKind INPUT eae SSMState gt i 2 checkAavaill r GuoteRequest 1 Guote ry return product gr product SS ry return quarndity gr quan
14. y to deal with this because the default value is false In our example we have 3 states Let us model these first then create the state transitions using SSMTransition elements After creating a transition select and delete the label lt lt SSMTransition gt gt which appears next to it For each state transition called switch in SSM language the following information should be entered e Operation in the Trigger group To see this property first choose an EventType of CallEvent This selection will show the Operation property in the Trigger group Click on the small dialog button to open the operation value Bj SSMState 1 Een lt lt CRaction gt fae CRatomic Ee lt GR Macquire gt gt Sa GRMblocking Luu GRMexclery an lt lt GRMrelease gt gt PL GRMexcery et lt lt P4openLoad gt gt bw PAoccurrence Lo PApriority Loo PArespTime an lt lt RTaction gt gt io det RTduration EE Co RTend Gen A PTskark S 2 echlewventzs sear CO RTak 2 ech Tpeaw Timer gt Lt RTtimerPar ie eR Tseb gt gt 2 Loe RTtimePar i e gg55MState gt gt Sere minitialstate true Figure 9 Setting initial state dialog On the tree which appears select the operation checkAvail from the Warehouse service fig 10 TransitionKind in the SSMTransition group Thi
Download Pdf Manuals
Related Search
Related Contents
FD-7900 - Hispano Racing GP2500 AA-8107 - Ono Sokki Technologies Manuel d`installation et d`utilisation de l`appareil Manual de manual de instalación y mantenimiento para controlador AKG Acoustics K 81 DJ User's Manual Electrolux FRIGIDAIRE PL30DD50EC User's Manual SUN FAST 35 - Jeanneau Owners Network Le Summum du Style et de la Performance® Istruzioni per l`uso della Guida Icone utilizzate in questa Guida Copyright © All rights reserved.
Failed to retrieve file