<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nomos Software</title>
	<atom:link href="http://nomos-software.com/feed" rel="self" type="application/rss+xml" />
	<link>http://nomos-software.com</link>
	<description>Models - Rules - Data</description>
	<lastBuildDate>Thu, 23 May 2013 11:32:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Model-Driven Again</title>
		<link>http://nomos-software.com/blog/model-driven-again</link>
		<comments>http://nomos-software.com/blog/model-driven-again#comments</comments>
		<pubDate>Thu, 22 Nov 2012 16:55:30 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[e-Government]]></category>
		<category><![CDATA[ISO20022]]></category>
		<category><![CDATA[Model driven]]></category>
		<category><![CDATA[NIEM]]></category>
		<category><![CDATA[OCL]]></category>
		<category><![CDATA[TMForum TIP Interfaces]]></category>
		<category><![CDATA[XGenerator]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=913</guid>
		<description><![CDATA[In an earlier post, I identified ISO20022 as a model-driven success story. Here, I give some other examples of model-driven from e-Government and telecommunications. They are not all at the same level of maturity, but the reason why a model-driven approach makes sense is the same.]]></description>
				<content:encoded><![CDATA[<p>In an earlier post, I identified ISO20022 as a <a title="A Model Driven Success Story" href="http://nomos-software.com/blog/a-model-driven-success-story">model-driven success story</a>. There are other examples. They are not all at the same level of maturity, but the reason why a model-driven approach makes sense is the same.</p>
<h2>Where is Model-Driven Used?</h2>
<p>German e-Government (<a title="Information on German e-Government XML standard" href="http://www.it-planungsrat.de/DE/Organisation/KoSIT/XOEVStandards/XOEVStandards_node.html">some information on the XML standards inGerman</a>,  <a title="XGenerator tool" href="https://joinup.ec.europa.eu/software/xgenerator/description">an english description of the XGenerator tool used</a>)</p>
<p>Telecommunications management interfaces (<a title="TMForum TIP Interfaces" href="http://www.tmforum.org/TMForumIntegration/6746/home.html">TMForum TIP interfaces</a>)</p>
<p>US government information exchange (<a title="NIEM-UML for US government information exchange" href="https://www.niem.gov/technical/Pages/niem-uml.aspx">NIEM-UML</a>)</p>
<p>And of course banking (<a href="http://iso20022.org">ISO20022</a>)</p>
<h2>What gets Generated from the Models?</h2>
<p>XSD, and sometimes WSDL.</p>
<h2>Why is it used?</h2>
<p>To ensure consistency in the messages and interfaces used in the domain.</p>
<h2>What does consistency mean?</h2>
<p>In banking, this means the message for making payments is similar to the message for sending out bank statements.</p>
<p>In telecommunications, this means the interface used to send an alarm about faulty equipment to a management system is similar to the interface used to activate a service on a piece of equipment.</p>
<p>In e-Government, this means that a message notifying others that a search warrant has been issued will be similar to a message notifying others that there has been an emergency call out.</p>
<p>When I say similar, I mean two things.</p>
<ul>
<li>First, it will be similar in technical structure.</li>
<li>Second, if the message or interface includes similar sorts of information, the information will be represented in similar ways. For example, phone numbers will be represented in one uniform way.</li>
</ul>
<h2>What&#8217;s the benefit?</h2>
<p>Using consistent technical structures means a programmer does not have to learn about new technical structures every time they have to deal with a new message or interface. This saves time.</p>
<p>Using consistent representations of the information saves time too. And reduces the chance of misinterpretations.</p>
<p>Another way of saying the same thing: it is easier for practitioners to work with a range of XML schemas and WSDLs that follow the same design patterns, and represent the same information in the same way, rather than with schemas that are individually handcrafted and inconsistent.</p>
<p>Making things easier reduces the so-called &#8216;integration tax&#8217; in getting IT systems to work together.</p>
<h2>How does model-driven ensure consistency?</h2>
<p>This is for another day, but you use OCL constraints on the model, and force consistency through the generation process.</p>
<h2>Do you know of other examples of model-driven?</h2>
<p>If you do, leave a note.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/model-driven-again/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Breaking the Slow Turnaround for Business Rules</title>
		<link>http://nomos-software.com/blog/breaking-the-slow-turnaround-for-business-rules</link>
		<comments>http://nomos-software.com/blog/breaking-the-slow-turnaround-for-business-rules#comments</comments>
		<pubDate>Mon, 15 Oct 2012 13:30:38 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Business Rules]]></category>
		<category><![CDATA[Cameo OCL Transformer]]></category>
		<category><![CDATA[Fast Turnaround]]></category>
		<category><![CDATA[MagicDraw]]></category>
		<category><![CDATA[OCL]]></category>
		<category><![CDATA[Webinar]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=897</guid>
		<description><![CDATA[What can you do to break the slow turnaround cycle for business rules? Get the team of people responsible for the business rule requirements to author and test the rules. Read about our approach, and watch the webinar.]]></description>
				<content:encoded><![CDATA[<p>What can you do to break the slow turnaround cycle for business rules?</p>
<h2>Our suggestion</h2>
<p>Get the team of people responsible for writing the business rule requirements to author and test the rules – for real.</p>
<h2>You may well ask&#8230;</h2>
<p>How can you do this if the team doesn’t know how to write code, and doesn’t work in a development environment?</p>
<h2>Solution</h2>
<p>Get the team to work with one of the standard modelling environments like MagicDraw. Give them a model of the business data, give them some very good examples of working rules, and then get them to <em>write and test </em>the rules – much better than excel.</p>
<h2>What does this give you?</h2>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/10/Fast-Turnaround.png"><img class="alignnone  wp-image-900" title="Fast Turnaround on Business Rules with Quality" src="http://nomos-software.com/wp-content/uploads/2012/10/Fast-Turnaround.png" alt="" width="569" height="402" /></a></p>
<p>&nbsp;</p>
<h2>Take a look at our webinar</h2>
<p>Take a look at our <a title="Webinars" href="http://nomos-software.com/resources/webinars">webinar</a>.  We show how you can capture, execute and test rules using MagicDraw and the Cameo OCL Transformer, and generate rulesets that can be deployed to test and production systems.</p>
<h2>Organise an online meeting</h2>
<p>And we can help you get started.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/breaking-the-slow-turnaround-for-business-rules/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Manage Business Rules in a Table in MagicDraw</title>
		<link>http://nomos-software.com/blog/how-to-create-a-generic-table-in-magicdraw</link>
		<comments>http://nomos-software.com/blog/how-to-create-a-generic-table-in-magicdraw#comments</comments>
		<pubDate>Tue, 18 Sep 2012 17:02:36 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Geneic Table]]></category>
		<category><![CDATA[MagicDraw]]></category>
		<category><![CDATA[OCL]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=857</guid>
		<description><![CDATA[Generic tables in MagicDraw are very useful and very easy to create. We use them to display lists of OCL rules in tables. Spend some time setting up customised tables for key information in your model, and you will be rewarded every time you open your project. We give step by step instructions on how to create one.]]></description>
				<content:encoded><![CDATA[<p>Tables in MagicDraw are very useful and very easy to create. We use them to display lists of OCL rules in tables. Spend some time setting up customised tables for key information in your model, and you will be rewarded every time you open your project.</p>
<p>But it&#8217;s hard to remember how to create them. A helpful hint: they are called generic tables in MagicDraw and are a type of diagram!</p>
<p>Here are some step by step instructions on how to create one.</p>
<h2>You will need:</h2>
<p>MagicDraw version 17.0 or later (though they may be available in a slightly earlier version of Magicdraw).</p>
<h2>The Steps:</h2>
<p>Select Diagrams-&gt;Diagram Wizards-&gt;Generic Table Wizard…</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Create-Generic-Diagram.png"><img class="alignnone  wp-image-859" title="Create Generic Table" src="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Create-Generic-Diagram.png" alt="" width="572" height="435" /></a></p>
<p>&nbsp;</p>
<p>Enter a table name e.g. &#8220;OCL Rules&#8221;, and select a location for the table in your project. Spend a bit of time thinking about where it should go, but you can always move it afterwards.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table-Name.png"><img class="alignnone  wp-image-860" title="Name of Generic Table" src="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table-Name.png" alt="" width="588" height="448" /></a></p>
<p>Select the type of thing (element) you want to list in the table. For example, you could select a constraint element or a class element. In our case, we select an OCLTransfomerValidationRule Stereotype (stereotypes are listed after elements in the dialog).</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table-Select-Element-1.png"><img class="alignnone  wp-image-862" title="Select Element Types for Table" src="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table-Select-Element-1.png" alt="" width="588" height="448" /></a></p>
<p>Select the elements to be displayed in the table. We select the package Payments, and click ‘Add Recursively’. All OCLTransformerValidationRules under this package will be displayed in the table.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table-Select-elements1.png"><img class="alignnone  wp-image-863" title="Select elements" src="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table-Select-elements1.png" alt="" width="588" height="448" /></a></p>
<p>Select the columns to be added. We choose Name (the name of the rule), Owner (the context of the rule), specification (the OCL), and Error message (the description).</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table-Select-Columns.png"><img class="alignnone  wp-image-864" title="Select Columns for Generic Table" src="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table-Select-Columns.png" alt="" width="588" height="448" /></a></p>
<p>Click finish and the table is created.</p>
<p>Here’s what our table of OCL looks like.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table.png"><img class="alignnone  wp-image-865" title="Generic Table in MagicDraw showing OCL" src="http://nomos-software.com/wp-content/uploads/2012/09/Blog-Table.png" alt="" width="601" height="336" /></a></p>
<p>&nbsp;</p>
<h2> In Summary</h2>
<p>It&#8217;s easy to create generic tables. They are very useful. And you can also customise them once they are created. It&#8217;s worth putting in a little effort to configure them in your project.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/how-to-create-a-generic-table-in-magicdraw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Origins of OCL</title>
		<link>http://nomos-software.com/blog/the-origins-of-ocl</link>
		<comments>http://nomos-software.com/blog/the-origins-of-ocl#comments</comments>
		<pubDate>Wed, 12 Sep 2012 15:55:34 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=805</guid>
		<description><![CDATA[Edward WIllink talks about the origins of OCL. It evolved at IBM from Syntropy as a 'business engineering language'. The problems of 'business engineering', or business to IT communication, are still very much with us today. OCL has a role to play. ]]></description>
				<content:encoded><![CDATA[<p><em>Edward Willink writes about the origins of OCL. Ed represents Nomos Software on the OCL and QVT RTFs at the OMG.</em></p>
<p>It is nearly 20 years since, in 1994, OCL evolved at IBM from Syntropy as a &#8216;business engineering language&#8217;. It is nearly 10 years since, in 2003, OCL 2.0 was split off from UML 2.0.</p>
<p>To understand the history of OCL, it is necessary to understand the history of UML, which arose in the 1990s as a compromise between competing modeling notations. This compromise is easy to criticize but to do so can ignore UML&#8217;s many successes, not least of which is that we no longer argue about the shape of a class; the Booch clouds have been consigned to history. UML and its SysML extension provide the standard graphical notations that can be used for a very wide range of modeling activities. Of course the real problem with UML is that it is too big and it lacks precision and so this is where progress is being made. Executable UML defines a subset with much more rigorous semantics. OCL provides the technology to express semantics rigorously.</p>
<p>OCL is a natural evolution from the original formula translation in Fortran. Data and objects are accommodated by &#8216;dot&#8217; operators as in Pascal or C or Java, so OCL is object-oriented. UML models are used as the type system for these objects so that OCL is model-oriented. Concepts from functional languages and lambda calculus are adopted so that OCL is collection-oriented, with the &#8216;arrow&#8217; operator providing operations and iterations on collections of objects. The ideas for OCL originated within IBM and with the benefit of hindsight may seem rather obvious; they represent a very pragmatic compromise between the lack of precision of informal language and formal languages such as Z that are perceived to be too complex and consequently unapproachable to many programmers.</p>
<p>The problems of ‘business engineering’ are still very much with us 20 years on. In modern parlance, how do we ensure more effective communication between business and IT? How do we capture business logic as an architecturally distinct component of a software system? OCL and models still have a role to play.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/the-origins-of-ocl/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Model Driven Success Story</title>
		<link>http://nomos-software.com/blog/a-model-driven-success-story</link>
		<comments>http://nomos-software.com/blog/a-model-driven-success-story#comments</comments>
		<pubDate>Wed, 29 Aug 2012 11:26:31 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FpML]]></category>
		<category><![CDATA[ISO20022]]></category>
		<category><![CDATA[Model driven]]></category>
		<category><![CDATA[XML Schema]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=779</guid>
		<description><![CDATA[One of the goals of modelling and model-driven approaches is to simplify. That’s the theory. But is there any clear evidence that model-driven approaches deliver? We give an example: FpML (handcrafted XML schema for an admittedly complex domain, derivatives trading) is much more complex than ISO20022 (a set of XML schemas for a variety of financial transactions, created using a model-driven approach). 
]]></description>
				<content:encoded><![CDATA[<p>One of the goals of modelling and model-driven approaches is to simplify. That’s the theory. But is there any clear evidence that model-driven approaches remove rather than add complexity?</p>
<p>From our work with many real world XML Schemas at Nomos Software, we see evidence that model-driven can deliver.</p>
<p>Here’s an example from the domain of financial messaging standards. FpML (handcrafted XML schema for an admittedly complex domain, derivatives trading) is much more complex than ISO20022 (a set of XML schemas for a variety of financial transactions, created using a model-driven approach).</p>
<p>Defining standards is notoriously difficult: creating something simple that caters for all scenarios.</p>
<p><em>Everything should be made as simple as possible, but no simpler – Albert Einstein</em></p>
<p>Let’s explore a bit more.</p>
<h2>FpML</h2>
<p>FpML is a financial messaging standard for derivatives trading. It is a set of many inter-related XML Schemas. The message schemas are large and complex. FpML is complex in part because derivatives trading is itself complex. But the schemas are also complex because they were defined when XML Schema itself was quite a new standard, they are handcrafted, and they are designed to be used in a large number of different scenarios.</p>
<p>IT teams working with FpML have to work with this complex set of schemas.</p>
<h2>ISO20022</h2>
<p>Now consider ISO20022. ISO20022 is a set of financial messaging standards covering securities, payments, and corporate actions among others. ISO20022 messaging is defined using a model-driven approach. One large model is created (in UML, and more recently in Eclipse EMF), and individual message schemas are generated from this single large model. Each XML Schema that is generated has a specific purpose. So for example, there is an XML Schema for initiating payments, and there is another XML Schema for bank account statements</p>
<h2>ISO20022 is dramatically simpler</h2>
<p>What is clear when you look at the ISO20022 messaging is that the XML Schemas are dramatically simpler than the FpML Schemas.</p>
<p>For a bird’s eye view of the difference, take a look at FpML schemas on the file system:</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/08/FpML.png"><img class=" wp-image-780    alignnone" title="FpML Schemas on the File System" src="http://nomos-software.com/wp-content/uploads/2012/08/FpML.png" alt="FpML Schemas on the File System" width="580" height="464" /></a></p>
<p><em>You can download the FpML schemas from <a title="FpML Specifications" href="http://www.fpml.org/spec/login.php">here</a>.</em></p>
<p>Compare this to an ISO20022 schema:</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/08/ISO20022.png"><img class=" wp-image-781  alignnone" title="ISO20022 Schema on the File System" src="http://nomos-software.com/wp-content/uploads/2012/08/ISO20022.png" alt="ISO20022 Schema on the File System" width="616" height="161" /></a></p>
<p><em>You can download the ISO20022 schemas from <a title="ISO20022 Messages" href="http://www.iso20022.org/full_catalogue.page">here</a>.</em></p>
<h2>Simpler in what ways?</h2>
<p>ISO20022 is made up of many different individual messages.</p>
<p>Each message is used for a single purpose.</p>
<p>Each message is a single schema with no imports.</p>
<p>Complex constructs like substitution groups are not used.</p>
<p>This all means it is easier for IT teams to use ISO20022 messaging.</p>
<h2>How has model-driven helped?</h2>
<p>It ensures simplicity combined with consistency.</p>
<p>For simplicity, you need a single message for a single purpose. But the messages also need to be consistent with each other. Maintaining consistency across many messages is very difficult if each message is handcrafted independently. With model-driven, consistency is managed in the main model, and simple messages for a single purpose are generated from there.</p>
<p>For simplicity, the XML schemas need to be ‘technically’ straightforward (e.g. no imports and no substitution groups) and ‘technically’ consistent (if an IT team learns how to use an ISO20022 message for one purpose, there should be no technical barrier to using a second ISO20022 message for another purpose). Simple XML schemas can be handcrafted, but once again, ensuring that a large number of handcrafted schemas are consistently simple is difficult. With model-driven, the generation step can be used to programmatically ensure ‘technical’ simplicity.</p>
<p><em>A sidebar: some of the people involved in ISO20022 had previously been involved in FpML.</em></p>
<h2>Consistency of Design in ISO20022</h2>
<p>ISO20022 creates many disparate XML Schemas for different purposes. Consistency across this set of messages needs to be maintained. ISO20022 replaces previous messaging standards e.g. ISO15022. Because a model-driven approach was used for ISO20022 and not for previous standards, there is much more consistency across the different ISO20022 messages.</p>
<h2>In Summary</h2>
<p>Consistency combined with simplicity would not be possible without a model-driven approach. ISO20022 may not be perfect, but it is a success story for model-driven. ISO20022 impacts hundreds of thousands of IT teams: it is being used by all European banks and corporates for payments, and adoption is only set to grow  ISO20022 messages must be simple. The modelling step has shown a high return on investment for the whole the finance industry and those who depend on it.</p>
<h2>Any Comments?</h2>
<p>What are your experiences with ISO20022 and FpML? What other approaches work to create simple XML schemas for broad and complex domains? <a title="Contact" href="http://nomos-software.com/contact">Contact us</a> if you would like to discuss more.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/a-model-driven-success-story/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Generate an XML Schema from MagicDraw &#8211; Part II</title>
		<link>http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw-ii</link>
		<comments>http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw-ii#comments</comments>
		<pubDate>Fri, 06 Jul 2012 12:11:13 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[MagicDraw]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[XML Schema]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=720</guid>
		<description><![CDATA[The second post on generating XML Schemas from MagicDraw. We explain the final steps, and what you can do next.]]></description>
				<content:encoded><![CDATA[<p>In our <a title="How to Generate an XML Schema from MagicDraw" href="http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw">first post on generating an XML Schema from MagicDraw</a>, we showed how to transform a class model into a model of an XML Schema. The final step in the process is to generate an actual XML Schema (a .xsd file) from the transformed model using a ‘Code Engineering Set’.</p>
<h2>You will need&#8230;</h2>
<p>To have followed the steps in the first post!</p>
<h2>Create a code engineering set</h2>
<p>You may or may not see a &#8216;Code engineering sets&#8217; node in the MagicDraw containment tree. If you don&#8217;t, click on the &#8216;Show Code Engineering Sets&#8217; icon at the top of the tree to make the node visible.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Show-Code-Engineering.png"><img class="alignnone size-full wp-image-722" title="Code engineering sets" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Show-Code-Engineering.png" alt="Code engineering sets" width="378" height="140" /></a></p>
<p>To create a code engineering set, select the &#8216;Code engineering sets&#8217; node in the tree, right click and select New-&gt;XML Schema from the popup menu.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-New-XMLSchema-Code-Eng.png"><img class="alignnone  wp-image-723" title="Create XML Schema code engineering set" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-New-XMLSchema-Code-Eng.png" alt="Create XML Schema code engineering set" width="562" height="346" /></a></p>
<p>You will be prompted to give the set a name. In our example, we use PaymentsSchema.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Enter-Code-Eng-nae.png"><img class="alignnone size-full wp-image-726" title="Enter code engineering set name" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Enter-Code-Eng-nae.png" alt="Enter code engineering set name" width="211" height="144" /></a></p>
<p>A new node then appears in the tree.</p>
<h2>Configure (edit) the code engineering set</h2>
<p>You will need to identify the model that is the basis for the schema generation (the transformed model). Click on the new node, and select &#8216;Edit&#8230;&#8217; from the popup menu.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Edit-Code-Eng.png"><img class="alignnone size-full wp-image-724" title="Edit code engineering set" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Edit-Code-Eng.png" alt="Edit code engineering set" width="388" height="238" /></a></p>
<p>In the code engineering set dialog, select the tab ‘Add Data from Model’. Select the package containing your transformed model (&#8216;Payments Schema’ in our example), and click ‘Add Recursively’. An entry ‘schema.xsd’ will appear in the right hand column.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Code-Eng-Data-Selected..png"><img class="alignnone size-full wp-image-725" title="Edit code engineering set properties" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Code-Eng-Data-Selected..png" alt="Edit code engineering set properties" width="561" height="546" /></a></p>
<p>Close the dialog.</p>
<h2>Rename the &#8216;schema.xsd&#8217;</h2>
<p>By default, the name of the generated schema is &#8216;schema.xsd&#8217;. But it is useful to give your XML schema file a meaningful name. The name of the .xsd node under code engineering sets in the tree is what determines the name of the XML schema file. We recommend you rename it.  Select schema.xsd and from the popup menu, select Rename. In our case, we rename to paymentsSchema.xsd.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-rename-schemaxsd.png"><img class="alignnone size-full wp-image-727" title="Rename Schema" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-rename-schemaxsd.png" alt="Rename Schema" width="367" height="74" /></a></p>
<p>You will notice that a File View package has appeared in the tree. This contains a component element representing the schema file.  You don&#8217;t need to do anything with this!</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/File-View.png"><img class="alignnone size-full wp-image-728" title="File View" src="http://nomos-software.com/wp-content/uploads/2012/07/File-View.png" alt="File View" width="380" height="436" /></a></p>
<h2>Generate the XML schema</h2>
<p>You are now ready to generate the schema. Select the .xsd node, right click and select &#8216;Generate&#8217; from the popup.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Schema-Generate.png"><img class="alignnone size-full wp-image-729" title="Generate Schema" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Schema-Generate.png" alt="Generate Schema" width="378" height="320" /></a></p>
<p>You will need to select the output directory. We use the default in our example – the install location for MagicDraw.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Code-eng-select-output-directory.png"><img class="alignnone size-full wp-image-730" title="Select output directory" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Code-eng-select-output-directory.png" alt="Select output directory" width="330" height="250" /></a></p>
<p>Your schema should now be generated.</p>
<p>Locate the .xsd file in the output directory and open in an XML editor. Check what it looks like and make sure it is a valid schema &#8211; most XML editors will provide an option to check the schema is valid. Here&#8217;s a visual representation of what the schema looks like for our payments example:</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-XML-schema-in-XML-Spy.png"><img class="alignnone  wp-image-732" title="XML schema File" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-XML-schema-in-XML-Spy.png" alt="XML schema File" width="585" height="475" /></a></p>
<p>And try generating an XML file from it  &#8211; again, most XML editors will give you this option.  Here&#8217;s what an XML file based on our example schema.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Generated-XML-File.png"><img class="alignnone  wp-image-731" title="Generated XML File" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Generated-XML-File.png" alt="Generated XML FIle" width="614" height="491" /></a></p>
<h2>Now you can add OCL rules&#8230;</h2>
<p>Once the schema generation is working, you can start adding OCL business rules to the MagicDraw model, and generate executable rulesets from the OCL. Use the XML schema to validate that your XML files are syntactically correct, and use the executable rulesets to validate that the content of the XML files meets your business rules. Take a look at the <a title="Cameo OCL Transformer for MagicDraw" href="http://nomos-software.com/products/cameo-ocl-transformer-for-magicdraw">Cameo OCL Transfomer</a> product for details.</p>
<h2>And don&#8217;t forget the tip about rerunning transformations</h2>
<p>When you make changes to the classes in the source package, you will need to run a transformation again &#8211; and regenerate the schema. If you run the transformation from scratch, the changes you made to add a global element to the .xsd class in the transformed model will be lost. Instead, you can update the transformed model. Use the ‘update transformed model’ option. Select the target model in the tree (Payments Schema package in our example). Right click and select Tools&gt;Update Transformed Model’ from the popup menu.  Select the option to <strong>Change destination properties according to source</strong>, and ‘refresh’ the model.</p>
<p>To regenerate the XML schema, just select .xsd node under Code engineering sets again, and select the &#8216;Generate&#8217; option from the popup menu. The XML schema file is regenerated and will reflect the changes made to your source model (new classes, changed properties etc).</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw-ii/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Generate an XML Schema from MagicDraw &#8211; Part I</title>
		<link>http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw</link>
		<comments>http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw#comments</comments>
		<pubDate>Wed, 04 Jul 2012 16:40:02 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[MagicDraw]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=676</guid>
		<description><![CDATA[One of the useful things you can do with MagicDraw is generate XML Schemas. We explain how to generate a valid XML schema from a simple MagicDraw class model. Once this is working, you can start adding OCL business rules to the MagicDraw model, and generate executable rulesets from the OCL. Then you can validate XML files against the generated XML schema, and against generated business validation rules.]]></description>
				<content:encoded><![CDATA[<p>One of the useful things you can do with MagicDraw is generate XML Schemas. We explain how to generate a valid XML schema from a simple MagicDraw class model.</p>
<h2>What we are using</h2>
<ul>
<li>MagicDraw 17.0.1 Enterprise Edition</li>
<li>The Cameo Data Modeler</li>
</ul>
<p>If you are using an earlier version of MagicDraw, you won&#8217;t need the Cameo Data Modeler.</p>
<h2>You will need&#8230;</h2>
<p>A class model in MagicDraw, your &#8216;source model&#8217;, ideally with a class diagram. For example, something like the following. The Payments package on the left contains classes and a diagram.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Project2.png"><img class="alignnone  wp-image-697" title="Example MagicDraw Project" src="http://nomos-software.com/wp-content/uploads/2012/07/Project2.png" alt="Example MagicDraw Project" width="561" height="331" /></a></p>
<h2>The main steps</h2>
<p>Starting with the UML class model:</p>
<ol>
<li>Use &#8216;Model Transformations&#8217; to transform the class model to a UML model of an XML Schema</li>
<li>Make some small updates to the transformed model</li>
<li>Use a &#8216;Code Engineering Set&#8217; to generate an XML Schema (a .xsd file) from the transformed UML model</li>
</ol>
<p>We will cover the first two steps in this post. Check out &#8216;<a title="How to Generate an XML Schema from MagicDraw – II" href="http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw-ii">How to Generate an XML Schema from MagicDraw &#8211; II</a>&#8216; for details on the third step.</p>
<h2>What the transformation step does</h2>
<p>In step 1, elements from the &#8216;source&#8217; model are created in a &#8216;target&#8217; model and  &#8216;stereotyped&#8217; to identify how the elements in the class model are to be represented in XML schema. For example, the Payment class in the source model gets transformed into a Payment class stereotyped as &lt;XSDcomplexType&gt;, with properties stereotyped as &lt;XSDelement&gt;s, etc&#8230;</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Example-Mapping.png"><img class="alignnone size-full wp-image-686" title="Example Mapping" src="http://nomos-software.com/wp-content/uploads/2012/07/Example-Mapping.png" alt="" width="410" height="120" /></a></p>
<p>&nbsp;</p>
<h2>Doing a transformation</h2>
<p>To transform the class model to an &#8216;XML Schema&#8217; model, select the Menu &#8216;Tools-&gt;Model Transformations&#8217;.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-XSD-Xtrom-menu1.png"><img class="alignnone  wp-image-683" title="Model Transformations Menu Item" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-XSD-Xtrom-menu1.png" alt="Model Transformations Menu Item" width="234" height="161" /></a><br />
This opens the Model Transformation Wizard. Select the UML to XML Schema transformation type. If you have not already included the modules needed for schema transformations, these will be automatically included by MagicDraw at this point.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-UML-to-XML-Schema-Xtofmr.png"><img class="alignnone  wp-image-685" title="Model Transformations Wizard" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-UML-to-XML-Schema-Xtofmr.png" alt="Model Transformations Wizard" width="573" height="418" /></a></p>
<p>&nbsp;</p>
<p>Click Next, and select the &#8216;source&#8217; for the transformation, that is, select the package containing the class model. In our example, we select the Payments package.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Select-Xform-Source.png"><img class="alignnone  wp-image-689" title="Select Source Model" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Select-Xform-Source.png" alt="Select Source Model" width="573" height="418" /></a></p>
<p>&nbsp;</p>
<p>Select the destination for the transformation, the &#8216;target model&#8217;. We choose to place the transformation in a package called Payments Schema, and create a new package for this purpose.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Select-Destination.png"><img class="alignnone  wp-image-691" title="Create Destination Package" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Select-Destination.png" alt="Create Destination Package" width="197" height="369" /></a></p>
<p>At this point, click Finish, skipping steps 3, and 4 (accepting the defaults that MagicDraw uses), and the source model gets transformed.</p>
<p>The new Payments Schema package is populated with the transformation. Take a look at the tree below. You will see that the new Payments Schema package now contains a Payments package almost identical to the source package Payments. It contains classes of the same name as the classes in the source package, and a diagram of the same name as the original diagram.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Transformed-Model-Tree.png"><img class="alignnone  wp-image-696" title="Tree containing Transformed Model" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Transformed-Model-Tree.png" alt="Tree containing Transformed Model" width="214" height="482" /></a></p>
<p>&nbsp;</p>
<p><strong>Note that  there is one addition – a Payments.xsd class. You will need to make some updates to this.</strong></p>
<p>But first take a look at the diagram that was generated. You will see that the classes in the target model are stereotyped as XSD constructs.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Transformed-Model-Picture.png"><img class="alignnone  wp-image-699" title="Class Diagram for Transformed Model" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Transformed-Model-Picture.png" alt="Class Diagram for Transformed Model" width="555" height="363" /></a></p>
<p>&nbsp;</p>
<p>You will also notice that the diagram is a bit of a mess. This is easy to correct. Select one of the options from the Layout menu, and you should get a diagram looking something like this:</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Xformer-Tidied-Picture.png"><img class="alignnone  wp-image-700" title="Well laid out diagram in transformed model" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Xformer-Tidied-Picture.png" alt="Well laid out diagram in transformed model" width="565" height="248" /></a></p>
<h2>Making updates to .xsd element in the transformed model</h2>
<p>Look again at the newly created class, Payments.xsd in our example. This represents the XML schema itself. The name comes from the package name in the source model. Drag this class onto your class diagram.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Schema-component2.png"><img class="alignnone size-full wp-image-705" title="XSDschema element" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Schema-component2.png" alt="XSDschema element" width="214" height="92" /></a></p>
<p>You will see that it is stereotyped as an &#8216;XSDSchema&#8217;.</p>
<p>If this is to be a top level schema, you will need to add at least one ‘global element’ to the .xsd class (Payments.xsd in our example). We will create a global element of type &#8216;BulkPayments&#8217;, so that any XML file based on this XML schema will need to contain a global &#8216;BulkPayments&#8217; element.</p>
<p>Create a property element on the class (right click New element-&gt;Property). Double click on the property to open the Specification dialog, type in a name (bulkPayment in our example), and choose the type. We  set it to the BulkPayments class in the target package (from PaymentsSchema).   <em>Tip</em>: <em>If you start typing the name of the class in the entry field e.g. Bul, the list of classes starting with B will be displayed.</em></p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Change-Property-Type.png"><img class="alignnone  wp-image-707" title="Property Specification Dialog" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Change-Property-Type.png" alt="Property Specification Dialog" width="558" height="402" /></a></p>
<p>&nbsp;</p>
<p>The property needs to be stereotyped as an &#8216;XSDElement&#8217;. Update the &#8216;Applied Stereotype&#8217; field in the Specification dialog.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Stereotype-Propert-as-XSDElemnt.png"><img class="alignnone  wp-image-710" title="Property Specifcation Stereotype" src="http://nomos-software.com/wp-content/uploads/2012/07/Blog-Stereotype-Propert-as-XSDElemnt.png" alt="Property Specifcation Stereotype" width="584" height="426" /></a></p>
<p>Your XSDschema class should now look something like this:</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/07/XSDschema-element-with-global-element-property.png"><img class="alignnone size-full wp-image-709" title="XSDschema element with global element property" src="http://nomos-software.com/wp-content/uploads/2012/07/XSDschema-element-with-global-element-property.png" alt="XSDschema element with global element property" /></a></p>
<h2>In case you want to set your own URL&#8230;</h2>
<p>One of the tags on the class defines the namespace for the schema. The namespace is defaulted to the name of the package in the source – Payments in this case. If you want to change this to a URL, double click on the Payments.xsd class to open the Specification dialog, select tags and change the value of the Namespace tag e.g. to something of the form http ://my.namespace/ package. But this step isn&#8217;t essential.</p>
<h2>You are now ready&#8230;.</h2>
<p>You are now ready to create an XML schema (.xsd file) using a code engineering set. Check out the blog post<a title="How to Generate an XML Schema from MagicDraw – II" href="http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw-ii"> &#8216;How to Generate an XML Schema from MagicDraw &#8211; II&#8217; for details.</a></p>
<h2>One final important tip on rerunning transformations</h2>
<p>If you make a change to classes in the source package, and transform again, the .xsd class will be created and the ‘global element’ property that you added manually will be removed. To avoid this, use the &#8216;update transformed model&#8217; option. Select the target model in the tree (Payments Schema package in our example). Right click and select Tools&gt;Update Transformed Model’ from the popup menu.  Select the option to <strong>Change destination properties according to source</strong>, and &#8216;refresh&#8217; the model.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/how-to-generate-an-xml-schema-from-magicdraw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging MagicDraw Plug-ins in Eclipse</title>
		<link>http://nomos-software.com/blog/debugging-magicdraw-plugins-in-eclipse</link>
		<comments>http://nomos-software.com/blog/debugging-magicdraw-plugins-in-eclipse#comments</comments>
		<pubDate>Tue, 12 Jun 2012 17:44:23 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[MagicDraw]]></category>
		<category><![CDATA[No Magic]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=602</guid>
		<description><![CDATA[Eclipse IDE is a great environment for debugging, and very useful for MagicDraw plug-in developers. Getting this to work for small MagicDraw plugins is straightforward, but we ran in to a few minor problems when trying to set it up for some larger plugins. Here's what we found.]]></description>
				<content:encoded><![CDATA[<p>Eclipse IDE is a great environment for debugging, and very useful for MagicDraw plug-in developers. You&#8217;ll find information on how to debug the plug-in in Eclipse in the The MagicDraw OpenAPI UserGuide (located in the &#8216;manual&#8217; directory of your MagicDraw installation directory). This works great for small plug-ins, but we ran in to a few problems when trying to debug some larger ones. In this post, we outline some of the problems we encountered and how we resolved them.</p>
<p>To make things clear, we will follow the steps outlined in the OpenAPI UserGuide. We&#8217;ll show where we couldn&#8217;t follow the steps exactly, and what we had to do.</p>
<p><em>The post is based on MagicDraw Version 17.0.1 and Eclipse Indigo Service Release 2.</em></p>
<p>Here goes&#8230;.</p>
<h2>Step 1: Create Java Eclipse Project for MagicDraw Plug-in</h2>
<p>We already had an existing project. We didn&#8217;t want to create a new one, so we had to skip this step. However, we did need to add all of the MagicDraw libraries to the project&#8217;s build path. Just like the guide recommends, we created a user library in Eclipse, which we called &#8216;MagicDraw&#8217;, and added it to the project&#8217;s build path.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/Screenshot-from-2012-06-12-11_28_41.png"><img class="alignnone size-full wp-image-603" title="Add Library" src="http://nomos-software.com/wp-content/uploads/2012/06/Screenshot-from-2012-06-12-11_28_41.png" alt="Add Library" width="525" height="507" /></a></p>
<p>We had previously developed some smaller plug-ins(that we didn&#8217;t debug in Eclipse), and had already added some libraries to the build path. These were MagicDraw specific jar files, such as md_api.jar, md.jar, md_common_api.jar, etc. If you have added any, it&#8217;s best to remove them before adding the user library you&#8217;ve created, because they may not be as up to date as the libraries your current MagicDraw version uses. We then added all of the libraries we need for our project, for example JAXB and Xbean libraries(it doesn&#8217;t matter if there are similar libraries in the user library you created). Some of the libraries may conflict with MagicDraw&#8217;s, but they are necessary, as you may have a different version than the one contained within the MagicDraw lib folder.</p>
<p>To ensure no conflict occurs, when you start, or debug MagicDraw in Eclipse – right click on your project → Build Path → Configure Build Path&#8230; then, click the &#8216;Order and Export&#8217; tab. Once there, we made sure that the order was as follows: our source project was on top, followed by the JDK, then our &#8216;MagicDraw&#8217; user library was located ABOVE any other jar, or library that we added to the project. After that, there was no particular precedence.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/Screenshot-from-2012-06-12-11_31_15.png"><img class="alignnone  wp-image-604" title="Java Build Path" src="http://nomos-software.com/wp-content/uploads/2012/06/Screenshot-from-2012-06-12-11_31_15.png" alt="Java Build Path" width="560" height="437" /></a></p>
<h2>Step 2: Create Plug-in Main Class</h2>
<p>Follow step 2 from the MagicDraw OpenAPI UserGuide, “Each MagicDraw plug-in main class must extend the com.nomagic.magicdraw.plugins.Plugin class and implement its methods …&#8230;&#8230; However, please remember that the Eclipse generated implementation for isSupported() and close() methods returns the false value which should be changed to true for enabling the plug-in initialization and disposing.”</p>
<h2>Step 3: Prepare Plug-in Descriptor File</h2>
<p>Step 3 from the MagicDraw OpenAPI UserGuide says “The plug-in descriptor XML file should be written as described in &#8220;Step 4: Start MagicDraw From Eclipse Environment&#8221; on page 23 and placed to the &lt;MagicDraw installation directory&gt;\plugins\my_plugin_name directory.</p>
<p>Please note, that even plug-in descriptor file contains information about runtime plug-in jar, it is not necessary to build and deploy this jar to plug-in directory while plug-in is developed under Eclipse IDE.”</p>
<p>So, just add a plugin.xml file to the &lt;MagicDraw installation directory&gt;\plugins\my_plugin_name directory. You won&#8217;t need anything else. (This step also mentions different properties that are needed in the plugin.xml file, but they are needed, only when the plug-in is actually deployed in MagicDraw. This is outside the scope of this post but, we will come back to this in a future one.)</p>
<p>Our plugin.xml looks like this:</p>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;plugin id="nomos.plugin.five"
         name="Nomos Plugin Five"
         version="1.6"
         provider-name="nomos"
         internalVersion="15010"
         class="com.nomos.noMagic.NomosNoMagicPlugin5"&gt;
&lt;/plugin&gt;</pre>
<p>&#8216;com.nomos.noMagic.Plugin5&#8242; is the package in our Eclipse project, that contains our plug-in&#8217;s source code. NomosNoMagicPlugin5 is the plug-in main class in that package, mentioned in Step 2.</p>
<h2>Step 4: Start MagicDraw From Eclipse Environment</h2>
<p>Create a new debug, or run configuration, and add &#8216;com.nomagic.magicdraw.Main&#8217; as the &#8216;Main class&#8217;. Make sure your source project is set as the &#8216;Project&#8217;.  MagicDraw output can be redirected to Console by specifying the -verbose key in &#8216;Program arguments&#8217; under the &#8216;arguments&#8217; tab. In the VM arguments add -Xmx800M -XX:PermSize=4M -XX:MaxPermSize=135m -Dinstall.root=&#8221;someDrive/someFolder/MagicDraw”. Then click debug, or run! You can also specify -Dmd.plugins.dir=”someDrive/CustomPluginFolderWithPlugInDotXml/” if MagicDraw needs to be loaded with custom plug-ins only.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/Screenshot-from-2012-06-12-11_35_49.png"><img class="alignnone  wp-image-605" title="Debug Configurations" src="http://nomos-software.com/wp-content/uploads/2012/06/Screenshot-from-2012-06-12-11_35_49.png" alt="Debug Configurations" width="587" height="536" /></a></p>
<p>Do you notice any of these problems?</p>
<h4>In the Eclipse package folder there are .properties files</h4>
<p>Well, they shouldn&#8217;t be there. Remove the files from the package and try again. The package should only contain the files that are vital for your plug-in.</p>
<h4>There is more than one plug-in in the project</h4>
<p>We work on a few things for MagicDraw, and test our plug-ins in MagicDraw on its own, so we have already imported some of them via the &#8216;Resource/Plugin Manager&#8217;.  Go to the package (in Eclipse) containing any plug-in that is installed in MagicDraw and  exclude them from your project&#8217;s build path. Rebuild your workspace and try again.</p>
<h2>Still having an issue?</h2>
<p>Leave a comment!</p>
<h2>Learn More</h2>
<p>Check out the rest of the <a href="http://www.nomagic.com/support/documentation.html" target="_blank">MagicDraw OpenAPI UserGuide</a>.</p>
<p>See Xavier Seignard&#8217;s posts on  <a href="http://mdwhatever.free.fr/index.php/2010/03/how-to-develop-your-magicdraw-plugin/" target="_blank">how to develop MagicDraw plugins</a> and <a href="http://mdwhatever.free.fr/index.php/2010/07/how-to-debug-your-magicdraw-plugin/" target="_blank">debugging in Eclipse</a>.</p>
<p>Read about our <a title="Products" href="http://nomos-software.com/products" target="_blank">MagicDraw plugins</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/debugging-magicdraw-plugins-in-eclipse/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add OCL Rules in MagicDraw</title>
		<link>http://nomos-software.com/blog/how-to-add-ocl-rules-in-magicdraw</link>
		<comments>http://nomos-software.com/blog/how-to-add-ocl-rules-in-magicdraw#comments</comments>
		<pubDate>Thu, 07 Jun 2012 15:48:11 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Constraints]]></category>
		<category><![CDATA[MagicDraw]]></category>
		<category><![CDATA[OCL]]></category>
		<category><![CDATA[Rules]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=568</guid>
		<description><![CDATA[There are lots of good reasons for adding rules to models, and lots of good reasons for writing the rules in OCL. Here's a step by step guide on how to add a rule into MagicDraw - you'll find similar mechanisms for rules in other modelling environments.]]></description>
				<content:encoded><![CDATA[<p>There are lots of good reasons for adding rules to models, and lots of good reasons for writing the rules in OCL (see e.g. <a title="Jordi Cabot's post on OCL" href="http://modeling-languages.com/why-you-need-to-learn-ocl/">Jordi Cabot’s post on OCL</a> and the Nomos post on <a title="Getting Benefit from OCL Rules" href="http://modeling-languages.com/getting-benefit-from-ocl-rules-with-nomos/#more-2433">Getting Benefit from OCL Rules with Nomos</a>).</p>
<p>But what are the mechanics of adding rules into a modelling environment. Here’s how it’s done in MagicDraw. You&#8217;ll find similar mechanisms in other modelling environments.</p>
<p><em>This example uses MagicDraw Enterprise edition 17.0.1.</em></p>
<p>Let’s assume you have created the very simple model shown in the <a title="OCL Examples" href="http://nomos-software.com/blog/ocl-examples">OCL Examples</a> post in MagicDraw.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/Payments.png"><img class="alignnone size-full wp-image-571" title="Payments" src="http://nomos-software.com/wp-content/uploads/2012/06/Payments.png" alt="" width="124" height="179" /></a></p>
<h2>Add a Constraint Rule</h2>
<p>To add an OCL rule to the Payment class, select the class in Magicdraw (this is the ‘context’). Right click and select ‘New-&gt;Element-&gt;Constraint’.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/CreateConstraint.png"><img class="alignnone  wp-image-574" title="CreateConstraint" src="http://nomos-software.com/wp-content/uploads/2012/06/CreateConstraint.png" alt="" width="606" height="394" /></a></p>
<p>A new constraint rule appears in the tree under the selected class.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/NameInTree.png"><img class="alignnone size-full wp-image-575" title="NameInTree" src="http://nomos-software.com/wp-content/uploads/2012/06/NameInTree.png" alt="" width="329" height="267" /></a></p>
<h2>Type in a Name</h2>
<p>Type in a name for the rule on the tree e.g. FrenchCurrency.</p>
<h2>Write the rule in Natural Language</h2>
<p>Always write the rule in english (or another spoken language) first. We always define constraints as Validation Rules, and use the ‘error message’ field to add a natural language description. The error message field is only available if you stereotype the constraint as a validationRule. But you could create a Comment under the constraint and add the description there. In fact, sometimes we add both an error message and a higher level business description in a Comment.</p>
<p><em>To make the constraint a validation rule</em>, select the new constraint in the tree, right click, select Stereotype, and tick ‘Validation Rule’. You can type the first letter of the stereotype, v, to quickly find the right stereotype &#8211; saves scrolling through a long list of stereotypes.</p>
<p><span style="color: #ff0000;"><em>If you are using the Cameo OCL Transformer, stereotype the constraint as OCLTransformerValidationRule.</em></span></p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/StereotypeConstraint.png"><img class="alignnone  wp-image-576" title="StereotypeConstraint" src="http://nomos-software.com/wp-content/uploads/2012/06/StereotypeConstraint.png" alt="" width="598" height="383" /></a></p>
<p>Now double click the constraint in the tree. The constraint dialog opens.</p>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/Error.png"><img class="alignnone  wp-image-577" title="Error" src="http://nomos-software.com/wp-content/uploads/2012/06/Error.png" alt="" width="600" height="446" /></a></p>
<p>To add the description, click on the ‘Error Message’ field. Type directly into the entry box, or click on the ‘…’ button and type the message into a dialog.</p>
<pre style="padding-left: 30px;">If the country is France, the currency must be euro</pre>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/ErrorText.png"><img class="alignnone size-full wp-image-579" title="ErrorText" src="http://nomos-software.com/wp-content/uploads/2012/06/ErrorText.png" alt="" width="360" height="156" /></a></p>
<p><span style="color: #ff0000;"><em>If you are using the Cameo OCL Transformer, you will also need to provide a name in &#8216;ruleset&#8217; field. </em></span></p>
<h2>Add the OCL Expression</h2>
<p>OCL gets added to the Specification field in the Constraint dialog.  When you click on the Specification entry field, a ‘…’ button appears. Click to open the Specification dialog.</p>
<p>For Language, select ‘OCL2.0’.</p>
<p>Now type the OCL into the dialog:</p>
<pre style="padding-left: 30px;">Country = ‘france’ implies Currency = ‘EUR’</pre>
<p><a href="http://nomos-software.com/wp-content/uploads/2012/06/OCLText.png"><img class="alignnone size-full wp-image-580" title="OCLText" src="http://nomos-software.com/wp-content/uploads/2012/06/OCLText.png" alt="" width="342" height="270" /></a></p>
<p>That’s it. An OCL rule has been created.</p>
<h2>To create a second rule</h2>
<p>Creating a second rule is much easier. Just copy and paste the first rule. Then edit the rule name, the Error Message and the OCL. This saves on a few of the steps.</p>
<p>(Note: you can also manage your rules in a separate package in the model, rather than adding the rules to their ‘context’. Just add constraint rules to a package, and select the context in the Constraint dialog.)</p>
<h2>Learn more</h2>
<p>Watch out for our post on how to view OCL in the MagicDraw generic table. Makes it easy to view related rules together.</p>
<p>If you want to turn OCL rules captured in MagicDraw into executable rulesets and use the rulesets in development and test environments, contact us about our Cameo OCL Transformer product.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/how-to-add-ocl-rules-in-magicdraw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Schemas are a Gold Mine for Information Modellers</title>
		<link>http://nomos-software.com/blog/xml-schemas-gold-mine-information-modellers</link>
		<comments>http://nomos-software.com/blog/xml-schemas-gold-mine-information-modellers#comments</comments>
		<pubDate>Tue, 05 Jun 2012 12:05:58 +0000</pubDate>
		<dc:creator>Tricia Balfe</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[UML]]></category>
		<category><![CDATA[XML Schema]]></category>

		<guid isPermaLink="false">http://nomos-software.com/?p=560</guid>
		<description><![CDATA[Most software organisations are now using lots of XML Schemas. These are a mine of useful information. Load the schemas into UML environments and publish to the web, so that information modellers, business analysts, testers and everyone on the software project can understand how the business data is being modelled.]]></description>
				<content:encoded><![CDATA[<p>Development teams have taken to XML like ducks to water, and in the process they’ve been doing lots of data modelling. XML Schemas (or their earlier incarnation DTDs) are models of XML files. If you look around most software organisations, you will find lots of XML Schemas. The development teams have been doing undercover data modelling and these data models provide a great view of the business data that is embedded in the software systems.</p>
<p>The data models are a mine of useful information. Everyone on the project team needs to know about them – from Information Modellers, to Business Analysts, to Testers to Project Managers. But what they need to know about is the business concepts captured in the model, not the XML Schema constructs. They need to be able to see the wood from the trees.</p>
<p>That’s why it’s a good idea to load the XML schemas into the UML modelling environment you use. Let your modelling team browse the models that the development team are actually using. Publish the models on your web portal so everyone on the project can browse a business-centric view of the models.</p>
<div id="attachment_562" class="wp-caption alignnone" style="width: 386px"><a href="http://nomos-software.com/wp-content/uploads/2012/06/Page1_WebDocumentation.png"><img class=" wp-image-562" title="UML Model of XML Schema" src="http://nomos-software.com/wp-content/uploads/2012/06/Page1_WebDocumentation.png" alt="UML Model of XML schema" width="376" height="217" /></a><p class="wp-caption-text">UML Model of XML Schema, in Web Browser</p></div>
<p>Nomos provides tools to load XML Schemas into modelling environments. The Cameo XSD Import product for MagicDraw creates a business-centric model with one click. <a title="Cameo XSD Import for MagicDraw" href="http://nomos-software.com/products/cameo-xsd-import-for-magicdraw">Read about the product</a>, <a title="Cameo XSD Import for MagicDraw" href="http://www.nomagic.com/products/magicdraw-addons/cameo-xsd-import.html ">buy from NoMagic</a>, or contact us for information about integrations with other environments.</p>
]]></content:encoded>
			<wfw:commentRss>http://nomos-software.com/blog/xml-schemas-gold-mine-information-modellers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
