In fact, once we show them OCL on their own model in a training class, we often find people disagreeing over what the rule ought to be. They discover that they can understand the rules, and also that the rules capture some of their domain knowledge very effectively. So we always try to train people using their own models. Ideally it should be a model they know and understand. The best way to introduce people to OCL is to show them some OCL in a model. Tricia, do you have any experience in teaching people OCL? Even experience BA types who know SQL and Java seem to think of it as too complex. We all love them!Īctually, that’s not right – some people hate them. I love to be able to output the rules into business requirement and functional specs. I see you derive Java to validate data against the rules. Once the rules are visible, correct and rigorously defined, you keep finding places you can re-use them. It makes you look like an expert when you go back to the business with “Do you actually mean XXX or XXY when you say that?”, when all you have tried to do is write the OCL and can’t work out which attribute they actually mean.Ĭ) The ability to re-use the rules increases exponentially. Traditional methods dont encourage them into a consensus.ī) Writing rules in a structured way has the perhaps un-expected benefit of increasing the quality of the rules as originally expressed in English. This is great because the traditional approaches (especially Agile?) let them get away with ambiguous, un-written definitions. Tricia, my experience with getting value from OCL includes:Ī) The pain is getting the rules agreed in English! Not many places do that, and this process forces the “business” to do that. The potential for reuse and the resulting cost savings is enormous and easily justifies some extra effort in the modelling phase to make the models more complete. The rulesets are defined by domain experts, and can be reused across projects and applications. Models can be extended to include OCL business rules: the models are more complete, and you can generate executable rulesets from them. So OCL isn’t just useful to make sure models are correct. The messages are modelled in UML and XML schema, and the service is built using OCL business rules that describe the validation checks that the XML payments must comply with. The test service is used by banks and corporates around Europe to test payments messaging. Here’s an online test service for payments messaging that built with OCL business rules. For MagicDraw users who want to build rulesets directly from MagicDraw, we provide the Cameo OCL Transformer, and for IBM RSA users, we provide the OCL Transformer for IBM RSA. The Nomos RuleX product provides the capability of building and executing these OCL-based rulesets. The client passes an XML file to the web service, identifying the ruleset(s) against which the XML file needs to be validated, and is returned a list of errors. By building a simple Web Service client, the rulesets can be called from any platform. The rulesets can be deployed as java archives, or can be deployed behind the Nomos Validation Web Service. The products currently support execution of OCL invariants and OCL queries over XML data – where the XML conforms to an XML schema, and the XML schema is a model transformation as in the diagram below. It models a file containing bank ‘payment’ requests or payments recordsĪnd to see the rules in the MagicDraw environment in a little more detail:Īt Nomos, we build products that generate executable java rulesets from OCL. Here’s an example of a very simple MagicDraw model that includes OCL rules. No more handing over ambiguous textual descriptions of rules to programming teams, with all the duplication of effort that that entails. It’s real division of labour resulting in real efficiencies. The modellers and analysts, who understand the domain, can define the rules completely in the model, execute and test them, and then deploy. This streamlines the process of managing rules in a system. The models are more complete, and the OCL can be used to generate executable rulesets for use in downstream systems: either test or production. Using OCL, you can add business rules to the data models. Plenty of organisations build data models. But it’s also really valuable as a way to model more. OCL is great for modellers who want to ensure models are correct. Tricia Balfe explains us today how to get more out of our OCL rules with Nomos ( another reason to learn OCL).
0 Comments
Leave a Reply. |