Home
Cameo OCL Transformer User Manual
Contents
1. A Specification dialog opens Set the Applied Stereotype to oclTransformerPackage Two new properties will be listed in the dialog Ruleset and XML Schema Note If the OCLTransformerPackage stereotype is not available check that you have included the Cameo_OCL_ Transformer module in the project 14 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 BY Package Class Package Specification of Package properties Specify properties of the selected Package in the properties specification table Choose the Expert or All options from the Properties drop down list to see more properties E naag e neod cesta ol pa ve al Traceabiity Be B Documentation Hyperlin B Usage in Diagrams e E Template Parameters E Inner Elements seve Tags ae Constraints OCLTransformerPackage Package Cameo_OCL_Tran Figure 15 Stereotyping a Package 15 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 You must provide values for the two new properties Ruleset XMLSchema P OCLTransformerPackage Payments Specification of OCLTransformerPackage properties Specify properties of the selected OCLTransformerPackage in the properties specification table Choose the Expert or All options from the Properties drop down list to see more properties pene H E Documentation Hy perlin Usage in Diagrams H E Inner Elements game 2 Relations Applied Stereotype
2. 8 Diagrams lt gt Model Extensi B Y e E BulkFayments E ClearingHouse E FileTrailer E Header E Party id Integer amount Integer executionDake date payer Party 1 recipient Party 1 pa aymentMethod PaymentMethod 1 E oe securityDetails SecurityDetails 0 1 securityDetailsRkequired armount gt 1000 implies securi be 1 differentPartyNames payer name lt gt recipient name iep Ii min mount amount 10 H E SecurityDetails E E FaymentMethod Figure 17 OCL Rules in Tree 17 Copyright NOMOS IRE Limited trading as Nomos Software 2012 And here s what an individual OCL rule looks like in the MagicDraw constraint dialog P Constraint minAmount Specification of Constraint properties Specify properties of the selected Constraint in the properties specification table Choose the Expert or All options from the Properties drop down list to see more properties History 1 min mount amount 10 Payments Payment ee rninAnicunt amnount 10 minAmount GE Documentation Hyperlin aj m Be E eer customize 2 Inner Elements E Constraint 3 Relations e Teli inAmount im Specification amount gt 10 2 Constraints Constrained Element E Payment Payments Traceability Owner E Payment Payments To Do Implementation Ruleset payments E Validation Rule Severity error Error Message The minimum amount for a paymentis 10 u Abbreviat
3. B Tags Author Constraints Version To Do Owner Data URI Ruleset payments XML Schema Name The name of the NamedElement Figure 16 Setting the Ruleset and XMLSchema Properties Assign a ruleset name to the Ruleset package property The OCL transformer will generate a ruleset containing all rules found in this package with the ruleset name as this Rules are compiled against the XML Schema generated from the class model in the package Assign the XML Schema name to the XML Schema property Location can be defined by a path relative to the location of the current project or by an absolute path If no XML schema name is defined the Cameo OCL Transformer will by default work schemas located in the project directory You can also assign a schema directory to this property This is useful if schemas are spread across multiple directories Choose the root directory of the full set of related schemas 3 4 Adding OCL Rules to Model To add OCL rules to a MagicDraw model Select the context for the rule a MagicDraw class Add a constraint element Stereotype as an OCLTransformerValidationRule Then add to the constraint o Aname o An error message 16 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 o A ruleset name must be set to ruleset name in the class model package o The OCL tagged as OCL2 0 Here s what OCL rules look like in the containment tree 3a Containment Inheritance
4. Window Help Model Transformations Hyperlinks Containment a x Figure 8 Validate XML 9 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 You will be prompted to select an XML file Browse to lt MagicDraw_install_directory gt samples CameoOclTransformer bulkpayments xmlfiles Select one of the XML files S Please select the XML file to validate o FAIL_atLeastOnePaymentGreaterThanl00 xml FAIL_atLeastOnePaymentGreaterThan5 xml FAIL bankCodeSize xml FAIL_differentPartyNames xml FAIL executionDateMustBeSameAsSubmissionDate xnml FAIL fileTratlerCountCheck xml FAIL headerBanklodeMatches xml FAIL _lowOrHighValueClearingHouse xml FAIL minAmountx ml FAIL_numOtPaymentsMatches xml FAIL_paymentldsUnique xml __ FAIL_samePaymentMethod xml FAIL schernaValidation xml FAIL_securityDetailsRequired xml FAIL totallnHeaderMatches xml Valid_Payments xml I E Co File name Valid_Payments xml Files of type yrl Figure 9 Select XML File You will be prompted to select the directory containing the generated rules The directory name is the same as the name of the project Select PaymentsExample 10 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 Please select the directory containing the generated rules i di SimplePayments re b Recent Items Figure 10
5. XML File vscisiccsicstii ccceeiieceeieisaarisarerereetdeeisicsasieareeacseesereoares 9 Figure 8 Validate XML cccccsccsecceecceeceeccueceeeceeccueeceeceuecaeecseeaeeeuesaeeseeeeeeeceeseueseeeseeseesseees 9 Foure 9 Select AMEEN aruinn aaa a ai 10 Figure 10 Select Directory containing Generated Rules ccccececseeeeeeeeeeeeeseeeeneeeeaeeesaes 11 Figure 11 Results of Validate XML sais saniaareheian ua icadica diva arcadia sateiatanildid Na deiniaiaiaaniannnalahanatins 11 Figure 12 Use Module Menu Item cccccccceeccneeeseceeeeeneeeseeeseeeeseeeseueeaueeseeseueeseeeaeeessneenes 12 Fiore 13 USE Module Didog onenen ie eho hasan war ui ahi ceratelalh hella neat elabales 13 Figure 14 Cameo _OCL_Transformer Module shown in Tree ccccccececeeeeeeeeeeeeeeeeeeeenes 13 Foure 15 Ste FeO DING a Packages icanc ace at ape cca at ae a edie eae inl 15 Figure 16 Setting the Ruleset and XMLSchema Properties cccceecceeeeeeeeneeeeeeeneeeseeeeees 16 Figure 17 OCL Rules i Tre e cccccccccceccceeeceeeeeeeeeceeeeeeeeeseeeseuceseceseeeesaeeesaeesseeeesanseseneesaes 17 Figure 13 OGL Rue Dig OGen aaa a aaia a ukeamaseounaeiubend 18 PIQUE 1S Generale AUlOSCE a a hate velit Lead Renee at ca lia ty 19 Figure 20 TREGENehaAleIUICSOT iceacistaiavatanctniaseanonendncsenatauaiaiatanadaecinentneiiaeiansiaipnatalanaiudbicidds 19 Figure 21 Validate XML Menu It M cccceccsecceeeceeeeeeseeeeeeceeesseeseeeseeeeuesensees
6. in the properties specification table Choose the Expert or All options from the Properties drop down list to see more properties ee Fe Lp abe E gt History F Payments E ENIES Payments 2 Traceability aj G ae H E Documentation Hy perlin i Usage in Diagrams El OCLTransformerPackage E E Inner Elements gt a Applied Stereotype gt OCLTransformerPackage Package Cameo _OCL_ Transformer Author Version To Do Owner Data URI Ruleset payments XML Schema Name The name of the NamedElement Figure 4 Configured Package 7 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 Note that the package is stereotyped as an OCLTransformerPackage When you generate a ruleset the OCL rules associated with the ruleset in this package will be generated and compiled against the XML schema located in the same directory as the project 2 2 5 Generate a Ruleset Select the Payments package right click and select Cameo OCL Transformer gt Generate Ruleset New Element aE fic New Diagram t Bane EN EIT GEE Mew Relation z 3 ae FA OCL F Open in New Tab EE ERENER ES l Specification Enter stacton Oe Figure 5 Generate Ruleset Note If you receive an error relating to the java compiler and JAVA_HOME at this stage resolve by following steps outlined in the install procedure An error will be detected in one of the rules and will be di
7. CAMEO OCL TRANFORMER FOR MAGICDRAW USER MANUAL Date October 2012 Version 7 2 NOMOS SOFTWARE All contained material is considered proprietary information owned by Nomoseire Limited and is not to be shared copied or reproduced Copyright NOMOSEIRE Limited trading as Nomos Software 2012 1 2 Table of Contents Mro GUC UON eseo E T a E A deci 3 1 1 ISA E ea ae A EAEE 3 Gy STEIN sated a a a us wad a aa a a 4 2 1 als Wa Wie ll geen ore ere Sere cnr Geen Seance ere errr rer Sm ere ar re te re ree ee 4 2 1 1 Install Java J DK if None Available ccceccceeccsseeesseeeeeeeeseeseeeseesensestaeeeaeeteeenensenaenes 4 2 1 2 Point Magic Draw to Java J Kiiiidierdsatavnsanevdinseaindedeea tadreraeatanntanavainnadindaddaaadintaetaintats 4 2 2 Getting Started with an Example Project ccccceccccsseceeceeeseeeeeseeeeeeeeesseeeseeeessaeeeaaaees 5 2 2 1 Open the BulkPayments Project from the Example DireCtOry cccccecccseeeeseeeeeeees 5 2 2 2 What sin the Example Project cccccccccsscecsssceceeeesseseeseceeseseeseaeeesseeeeseeeesageessseenegs 6 2 2 3 What yourcan dO With Me Pro jeG Esters ciivsdeectonecisniauetdchonscntsdnieubedeessneneanesdubmadiarte 7 2 2 4 Look at How the Project is Configured ssssssrrssrrrrsrrrsrrrsrrrsrrrsrrrnrrrnrrrrerrresrrnrrrne 7 2 2 5 Generate a Rule tenlia eee a a aii ig a iade eae 8 2 2 6 Be cute the RUIGSOL Tiinaa A O A A E E sueeaianeenate 9 Workng with Your O
8. Select Directory containing Generated Rules The XML file will be validated against the generated rules Any errors detected in the file are displayed in the Validation Results area Element Severity Abbre Message The Id for each payment must be different paymentIdsUnique payment id gt asSequencet gt size Pa R error OCL sM Error found in XML file FAIL_paymentIdsUnique xml on line s 2 Figure 11 Results of Validate XML You have now validated an example file against the ruleset manually The ruleset can also be called programmatically by making calls directly to a jar java archive For details see the document Nomos Software Using the Runtime Java API doc This can be found in lt MagicDraw_install_directory gt plugins com nomagic magicdraw cameoocltransformer 11 Copyright NOMOS IRE Limited trading as Nomos Software 2012 3 Working with Your Own Project The OCL Transformer is used to generate rulesets from OCL contraints on class models You will need a project containing a class model To use the OCL Transformer Configure the project for the OCL Transformer Generate an XML Schema from the class model Configure the class model package for the OCL Transformer Add OCL Contraints to the class model You will then be able to Generate rulesets from the model Execute the rulesets against sample XML files that you create Deploy the ruleset 3 1 Configure th
9. ading as Nomos Software 2012 Open the file e g in notepad and set JAVA_HOME to the location of the installed JDK o E g JAVA_HOME C Program Files Java jdk1 6 0_19 a mduml properties Notepad File Edit Format View Help fixim wed Jun 13 11 50 11 BST 2012 JAVA_ARGS xmx800M XxX PermS1ze 40M Xx MaxPermS1ze 150M Duser language JAVA _HOME C Program Files Java db BOOT_CLASSPATH 11b xalan Jar MAIN_CLASS com nomagic magi cdraw Main MAC_JAVA_ARGS Xdock name MagicDraw Xdock icon bin app icns Dapple APP_ARGS DEFAULT_MEMORY_SETTINGS_64 xmx1200M Xx Perm5ize 60M_ XX MaxPerms7ze 2C DEFAULT_MEMORY_SETTINGS_32 xXmx800M Xx Perms7ze 40M XxX MaxPermsize 150 CONSOLE false CLASSPATH 1ib patch jar 1ib md jar 1ib md_ap1 jar 1lib md_cdo_1 0 jar 11k 1b commons httpclient 3 1 jar 11b commons logging 1 0 4 jar lib concurrent D bacaan dar ab ieee ie jars sii jbosssx as client jar 11 p i a T ee e aa A aa s f4j api 1 5 11 jar libslf4j jdk14 1 5 11 jar lib trove jar lib truezi d t Figure 1 Point MagicDraw to Java JDK 2 2 Getting Started with an Example Project Understand how to use the Cameo OCL Transformer by looking at an example project The plugin is shipped with an example BulkPayments project located at lt MagicDraw_install_directory gt samples Cameo0OclTransformer Check for example projects Under Downloads on the NoMagi
10. alidate XML i Tr D i i ka ty aad EA E He Con dy Inhe f Dia lt gt Mod Containment ap X Figure 21 Validate XML Menu Ite Model Transformations Hyperlinks You will be prompted to select an XML file Browse and select one of the example XML files You will be prompted to select the directory containing the generated rules The directory name is the same as the name of the project 20 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 F Please select the directory containing the generated rules i di SimplePayments re b Recent Items me Jet z diiin Files of type Compiled OCL Rulesets Figure 22 Select Directory containing Generated Rules The XML file will be validated against the generated ruleset Each of the rules that fails is listed in the Validation Results area Element Severity Abbre Message The Id for each payment must be different paymentidsUnique payment id gt asSequencet gt size Pa R error OCL sM Error found in XML file FAIL_paymentIdsUnique xml on line s 2 Figure 23 Validate XML Results This is the mechanism for validating XML files against the ruleset through the MagicDraw user interface The ruleset can be also be called programmatically either by making calls directly to the ruleset jar java archive or by using the Nomos Validation Web Service For details
11. c site at http www nomagic com products magicdraw addons cameo ocl transformer html And under MagicDraw Resources on the Nomos Software site at htip nomos software com resources 2 2 1 Open the BulkPayments Project from the Example Directory 1 Select File gt Open Project 2 Browse to samples CameoOclTransformer bulkpayments 3 Select BulkPayments mdzip and open 5 Copyright NOMOS IRE Limited trading as Nomos Software 2012 BulkPayments mdzip es All supported types Figure 2 Open Project 2 2 2 What s in the Example Project When you open the project you will see B MagicDraw UML 17 0 1 PaymentsExample mdzip C Models Payments Example E J a 4 o File Edit View Layout Diagrams aay Tools Analyze Collaborate Window Help DEBLA A 9r OB I R HA 5 c Mo ple PaymentsExample m i e al M S GH Aj Se Ered e Bulk Payments x OCL Rules Bulk Payments WaLL dy ob te eS A ree EE EQ eo BY 5s CI Common package Payments 5 Bulk Payments o Data Note cc H E File view abe Text Box v E Anchor v Containment v areia CEE Na Be are lane we aFileTrailer 1 header 1 payment 0 i Fil romeo dateOfBirth date ccountNumber Integer securityCode Integer bankCode String Under the Data element in the tree you will see File View package containin
12. e project You will need to Include the Cameo_OCL_Transformer module in the project 3 1 1 Including the Cameo_OCL_ Transformer module To include the Cameo_OCL_Transformer module in the project Select File gt Use Module Locate the Cameo _OCL_ Transformer module under the lt install root gt profiles Click Finish using the default Module Settings E MagicDraw UML 17 0 1 Test mdzip C Models Test Edit View Layout Diagrams Options Tools New Project Ctrl N Open Project Ctrl 0 Save Project Ctrl Save Project As Close Project Close All Projects Open Element from URL Use Modules Import From Export To Share Packages Figure 12 Use Module Menu Item 12 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 Choose a module to be used by the project from the file system or a predefined location project module path and click Next to proceed Predefined locations help finding default application profiles and libraries Select module file E From file system From predefined location Project modules paths lt project dir gt lt install root gt profiles z C Profile mdzip Cameo_OCL_Transtormer mdzip lel CIL_Profile mdzip lll Cloudscape_Profile mdzip dill CORBA_IDL_Profile mdzip lil DB2_Profile mdzip dil EA Profile Figure 13 Use Module Dialog You may be prompted to choose whether to display the modules in the tree If you choose to displa
13. eeeaueseeeneeeees 20 Figure 22 Select Directory containing Generated Rules ccccecceeeceseeeeeeeeseeeeseeeeneeeesaes 21 Foure 29 Valldale AME RESUS a ua accion 21 i Copyright NOMOSEIRE Limited trading as Nomos Software 2012 1 Introduction The Cameo OCL Transformer generates executable java rulesets from OCL captured in MagicDraw models The java rulesets can be executed over XML data that matches the model That is the rulesets execute over XML data that is structured according to an XML schema that maps to and is generated from the UML model in which the OCL expressions are captured The Cameo OCL Transformer product is powered by the RuleX product from Nomos Software 1 1 Usage With the Cameo OCL Transformer MagicDraw modellers can Add OCL rules to class models Generate XML Schemas from class models using native MagicDraw functionality Generate java rulesets based on the OCL Validate XML files against the XML Schema and the ruleset from the MagicDraw user interface Deploy the rulesets outside the MagicDraw environment and validate XML files against the XML schema and the ruleset via a programmatic interface 3 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 2 Getting Started 2 1 Install Plugin You will need MagicDraw UML minimum version 17 0 2 Cameo Data Modeller minimum version 17 0 2 Java JDK version 6 0 or later The plugin works on Windows UNIX and Lin
14. g paymentsSchema xsd Payments Package Payments Schema Package An OCL Rules table Click through the tabs on the righthand pane You will see adiagram called Bulk Payments of the class model from the Payments package atable of OCL rules adiagram called Bulk Payments of the class model transformed to an XML schema model from the PaymentsSchema package note this diagram will not be visible if the Cameo Data Modeler is not installed 6 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 2 2 3 What you can do with the Project With this project you can Generate an XML Schema Generate an executable ruleset based on the OCL Execute the rules over example XML files An XML Schema paymentsSchema xsd has already been generated and is available in lt MagicDraw_install_ directory gt samples CameoOclTransformer bulkpayments Example XML files are provided in lt MagicDraw_install_directory gt samples CameoOclTransformer bulkpayments xmlfiles For instructions on how to generate the XML Schema take a look at http nomos software con vblog 2 2 4 Look at How the Project is Configured Double click on the Payments package element In the specification dialog that opens you will see a Ruleset name payments ra P OCLTransformerPackage Payments Specification of OCLTransformerPackage properties Specify properties of the selected OCLTransformerPackage
15. ion Name The name of the NamedElement Type here to filter properties Ci l back Figure 18 OCL Rule Dialog For more details and screenshots showing how to add OCL rules to MagicDraw see the Nomos blog post Adding OCL rules to MagicDraw http nomos software com blog how to add ocl rules in magicdraw TIP Once you have created one rule you can copy and paste this rule The copied rule will be stereotyped correctly will be defined as OCL2 0 and will have the ruleset name set TIP Generic Tables are a great way of viewing rules Set one up for rules using Diagrams gt Diagram Wizards gt Generic Table Wizard For details check out nomos software con vblog 18 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 3 5 Generate a Ruleset Select the class model package right click and select Cameo OCL Transformer gt Generate Ruleset n r B ooo Ee Contai S Inherit ia Diagrams lt gt Model B Bulk Payments x FRY oc B New Element E E Data H E File v New Diagram Ep _e i C7 iti New Relation la E Ea Faym g r so a OCL F Open in New Tab ae Specification Enter stracton Figure 19 Generate Ruleset If the menu option isn t available check that the package has been stereotyped as an OCLTransformerPackage This step will compile all OCL2 0 rules in the class package with the same ruleset name as that defined in the
16. ma T r Filter gt v lt ALL gt v lt ALL gt oor Compiling ocL within Ruleset payments Element Severity Abbreviation se min amp mount amoun gt 10 Payments Payment error OCL to Java Compile Error with rule minAmount Unknown pathname amoun Compilation failed Figure 6 Generation Errors The problem is that the rule refers to an amoun property on the Payment class But the property is actually named amount To correct click on the OCL Rules tab find the minAmount rule in the table of OCL rules highlighted above click on the OCL and change amoun to amount Generate the ruleset once more and all rules should compile Tip You can regenerate the ruleset by clicking on the Refresh button on the Validation Results pane 8 Copyright NOMOS IRE Limited trading as Nomos Software 2012 2 2 6 Execute the Ruleset You can now validate XML files against the ruleset You can use the example payments XML files provided in lt MagicDraw_install_ directory gt samples CameoOclTransformer bulkpayments xmlfiles These files are valid according to the XML schema generated from the MagicDraw model Some of the XML files pass ruleset validation while others fail ruleset validation Here is what one of the example XML files looks like A lt n bulkPayments xmins n Payments xmins lt si http vw ww w3 org 2001 5 lt payme
17. nt i lt id gt lt id gt lt amount 20 lt amount lt executionDate gt 2001 12 17709 30 47 02 lt executionDate gt payer gt lt name gt aPerson lt name gt lt bank4 ccountNumber gt 0 lt bank4 ccountNumber gt i lt bankCode gt BIC45678 lt bankCode gt ejpayer erecipient gt i lt name gt aPersonk name gt lt bankAccountNumber 0 lt bankAccountNumber gt lt bankCode gt String bankCode gt i lt recipient gt lt paymentMethod gt Cheque paymentMethod lt securityDetails gt lt date O fBirth 2001 12 177T09 30 47 02 lt dateO fBirth gt gt i lt securityCode gt 0 lt securityCode gt i lt securityDetails gt lt payment gt lt header gt lt numberO fPayments gt 1 lt numberO fPayments lt submissionDate gt 2001 12 17109 30 47 02 submissionDate gt lt total 20 lt total gt lt bank gt lt name gt String lt name gt lt bankCode gt 8IC45676 lt bankCode gt lt vbank lt clearingHouse gt lt name gt String lt name gt lt code gt STEP2 lt code gt i lt clearingHouse gt header lt aFileTrailer gt lt numberOfRecords gt 1 lt numberO fRecords lt aFileTrailer gt lt n bulkPayments gt Figure 7 Example Payments XML File To validate an XML file select Tools gt Cameo OCL Transformer gt Validate XML E MagicDraw UML 17 0 1 PaymentsExample mdzip C Models Payments Example File Edit View Layout Diagrams Options Tools Analyze Collaborate
18. on calling directly to the ruleset jar see the document Nomos Software Using the Runtime Java API doc This can be found in lt MagicDraw_install_directory gt plugins com nomagic magicdraw cameoocltransformer 5 Learn More Check out blog posts at nomos software com blog Contact Nomos Software to find out about additional features Validation Web Service for executing rulesets 21 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 OCL Extensions OCL Queries used to pinpoint error locations Multiple rulesets Support for non standard UML to XML Schema mappings Support for non XML based data models 6 Contacting Nomos Software Support Nomos Software support can be contacted by emailing support nomos software com 22 Copyright NOMOSEIRE Limited trading as Nomos Software 2012
19. package Any errors detected are displayed in a Validation Results pane You can locate the rule in error by selecting the error On the popup menu choose Select in Containment Tree Double click the rule and correct the error TIP You can regenerate the ruleset easily from the Validation Results pane by clicking on the Refresh icon 1i mindmount amoun gt 10 Paynments Payment Figure 20 Regenerate Ruleset The ruleset is only generated once all compilation errors in the OCL rules have been resolved If the ruleset has already been generated it will be overwritten 19 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 4 Executing Rulesets via MagicDraw You can execute the generated rulesets against XML files from within MagicDraw using the Validate XML option As soon as you write a rule it is good to generate code execute it and make sure that the rule is working correctly The option to Validate XML is always disabled when you start MagicDraw Once you generate a ruleset the option becomes enabled 4 1 1 Create Example XML Files To execute the rulesets create some example XML files We recommend creating example files that exercise the rules you have written That is create positive and negative tests for each rule Standard XML editing tools can be used to generate sample XML files from the XML schema you have generated 4 1 2 Validate XML Select Tools gt Cameo OCL Transformer gt V
20. splayed in a Validation Results pane at the bottom of the window He Con fa Inhe 8 Dia lt gt Mod Bulk Payments F9 OCL Rules x Bulk Payments 4 gt eet X i By AddNew E Add Existing G amp Delete From Table ff Delete Up Q Down ShowColumns Gj Export a may S 75 Criteria po Sec amp G Party 7 Element Type OCLTransformerValidationRule Ef Payment l i po id Integer Name Error Message Specification Ruleset i amount Integer amount gt 1000 implies a i executionDate date 1 securityDetailsRequired If the amount of a Payment is greater than 1000 securityDetails must securityDetails gt notEmpty 0 Pay i payer Party 1 i recipient Party 1 E paymentMethod Payment 2 mamont e minimum amount for a payment is 10 us dollars re securityDetails SecurityDe i a i securityDetailsRequired am 3 differentPartyNames The payer and recipient names in a payment cannot be the same payments E Pay i o Fed differentPartyNames payer io Logi minAmount amoun gt 10 numberOfPayments lt 100 o H E SecurityDetails 4 maxNumberOfPayments The maximum numberOfPayments in a bulk payments file is 100 payments E Hea i H E PaymentMethod 2 Bulk Payments total gt 10000 implies E LIT OCL Rules ea n aa i s o san anana oa a dearinaHouse code TARGET2 and n H 5 Payments Sche
21. ux Follow the standard MagicDraw procedure for installing plugins Obtain a license for the Cameo OCL Transformer Plugin Activate the license and the plugin will be installed automatically MagicDraw can be installed with a java JRE or a java JDK For the OCL Transformer MagicDraw needs to use a java JDK Java Development Kit rather than a JRE Java Runtime Environment If MagicDraw has been installed with a JRE rather than a JDK you will need to install a JDK if none is installed already point MagicDraw to a JDK lf MagicDraw is configured to use a JRE rather than a JDK you will get the following error when you try to use the Cameo OCL Transformer plugin Fatal Error no java compiler found Please ensure JAVA_HOME is pointing at a JDK and not a JRE 2 1 1 Install Java JDK if None Available If a Java JDK version 6 0 or later is installed already skip this step Java JDK is usually installed in C Program Files Java If you need to install a Java JDK go to http www oracle com technetwork java javase downloads index html download the most recent Java JDK and install 2 1 2 Point MagicDraw to Java JDK Update the JAVA_HOME property for MagicDraw to point to a JDK rather than a JRE Identify the location and version of the installed JDK o usually found under C Program Files Java Locate the mduml properties file under lt MagicDraw_install_ directory gt bin 4 Copyright NOMOSEIRE Limited tr
22. wn Proje Crrredess ninae 12 3 1 Congue Ne OO SC asia a dots ds dceecs a nd donelmadlatai titi tideet NA 12 3 1 1 Including the Cameo OCL Transformer module 1 0 0 ceeeeeeteeeeeernteeeeeeeaaaeneees 12 3 2 Generate an XMLschema for the Class MOE eeececeeeeeeeseeeeeeeeeeeeaeeeeeeaaeeeenaees 14 3 3 Configure the Class Model Package cccccccccccssceeseeeeeseeeeseeeeseaeeeseeeessseessaeesseeeeneas 14 3 3 1 Configuring class model package CIEMENL cccccccseeccceeeeeeeeeeeeeesaeeeeseeeesaaeees 14 3 4 Adding OCL RulestO MOG 0 cj ier eee a eed eee erat t 16 3 5 GENE Mate a RUE SET naiirita tutes east aad ee 19 Executing Rulesets via MaQiC DIQW cccccccsssccsssscecseeceeseecseeeseaeeeseseesseaeeesaeesseseesegeesseeeesaaees 20 4 1 1 Ceate Bample XML Fle Satiiri ea aa ee a a aa 20 4 1 2 Vald ate AM Ean rene tenner A T TA 20 LEEMTE ar E E E ind 21 Contacting Nomos SOTW ale SUPPO sredo a a e e E E E E ES 22 Copyright NOMOS IRE Limited trading as Nomos Software 2012 Table of Figures Fig re 1 Point MagiGDraw 10 Java JDK rcictctetaeencael uae a usm nav eaensnenasnantads 5 Foe 2 Open IPRO CCE vecasieneatetadscaes caus aa EEEE T EEEE E RA 6 Moure S EXAMP E PTO CCl sdana A E RE itecntsaums 6 Figure 4 Configured Package ccccccssccceeccceceeeeeseeeeseeeeeseeeseeeeseeeseesesaeeeseeeeseeesseeesseeesaaes 7 Foue o Generale RIESE iu a N a a 8 Foue 6 Generalo n EMOS rosana eee eee eee sae ta aie 8 Figure 7 Example Payments
23. y the module in the tree you will see the module listed in grey in the tree To hide the module click on the highlighted icon below cE ts ra ef Class Package ER UML Standard Profile UML Standard Profile mdzip eat i PAL E nit De MaL i EPAL E Ep Cameo OCL Transformer Cameo OCL Transform B Model Transformation Fronte Model Transformatio E Ea sML Schema Profile SML_Schena_Profile mdzip Figure 14 Cameo_OCL_Transformer Module shown in Tree 13 Copyright NOMOSEIRE Limited trading as Nomos Software 2012 3 2 Generate an XML schema for the Class Model You will need to generate an XML Schema implementation data model from the class model The OCL ruleset will be compiled against this implementation data model and can then be executed against XML data that conforms to this XML schema Prerequisite Cameo Data Modeller must be installed To generate an XML schema from a class model you will need to Transform the UML class model to an XML Schema Model Use an XML Schema Code Engineering set to generate the XML Schema from the XML Schema model For instructions on how to generate an XML Schema take a look at htto nomos software com blog 3 3 Configure the Class Model Package You will need to Configure the package element that contains the class model 3 3 1 Configuring class model package element Double click the class model package element in the MagicDraw containment tree
Download Pdf Manuals
Related Search
Related Contents
2 Drücken Sie die Taste Nady Systems GEQ131 User's Manual GE JES1145WTC microwave Carregador Nokia DT-600 Notebook User Guide Copyright © All rights reserved.
Failed to retrieve file