XMLdation
XMLdation Wiki
XMLdation_logo.jpg
Was this page helpful?

User guide for OCL rules in XMLdation environment

    What is OCL?

    OCL (Object Constraint Language) is a query language originally developed for describing rules for UML models. OCL is managed by Object Management Group (OMG) and it is part of the UML standard. The official specifications can be found from OMG web pages at http://www.omg.org/spec/OCL/.

    XMLdation service and OCL

    In XMLdation service XML Schemas are mapped as UML models, which allows us to use OCL to create desired restrictions to an XML schema. Java code is generated based on the OCL definitions and executed against XML files in validation proces.

    The benefit of this is that we do not have to edit the underlying schema in any way; the schema and all of its restrictions stay as they have originally described. Therefore creating and maintaining business rules only involves maintaining series of OCL rules, which can be done with myXML. In addition, due to the extensitivity of OCL as a language, any type of restriction (business rule) can be created.

    Content of this guide

    The purpose of this guide is to provide all necessary information to write business rules with OCL.

    The guide consists of following parts:

    1. Description of a rule
    2. Concept of context
    3. OCL-statement
    4. OCL-query
    5. Collections
    6. Relationships
    7. Actions

     

    In addition, following reference is included

     

    The collection of rules in example rules written in OCL should already help a lot when implementing new rules, as it includes examples of "real world" usage of business rules in payment messages. A more detailed usage for all available methods is listed in available methods of OCL base types.

    List of all available data types in XML schemas mapped to OCL data types states how different data types are interpreted by OCL.

    Reference schema

    Multiple pages within this section use a specifc pre-made schema as a reference to explain logic of rules. The schema and an example file is attached on this page. Below is a screenshot of the reference schema

     

    External links and further reading

    Please note that this section of the wiki only focused on OCL as a language to depict rules. XMLdation offers a tool for writing and maintaining business rules in OCL language in a tool called myXML. User guide on how to use myXML is also available in a separate wiki section. 

    Other sources providing information regarding OCL are below:

    OCL Rule User Guide, by Nomos Software, 2015

    OCL Quick Reference, by Eoin Woods, July 2005

    OCL Operations Reference, by Eclipse Foundation

    Was this page helpful?
    Tag page (Edit tags)
    • No tags
    You must login to post a comment.
    Powered by MindTouch Core

    XML management

    Business rule and ver­sion mana­ge­ment (XML/JSON), inte­gra­ted with Vali­dator and Simu­lator. Auto­ma­ted test and example file gene­ra­tion, docu­men­tation and life cycle ma­na­ge­ment.

    Message validation

    Leading XML Vali­da­tor® for pay­ments, e-in­voi­ces and other finan­cial mes­sa­ges via web brow­ser or API. With Wiki know­ledge base for ef­fi­cient lear­ning and bug­fixing.

    End-to-end simulation

    Full end-to-end tes­ting in­te­gra­tion ser­vice, si­mu­la­ting bank’s res­ponse to cor­po­rate cus­to­mers.

    XML Expertise

    Project work and sup­port for XML deve­lop­ment (ISO 20022 and CGI-MP com­pli­ance pro­jects). En­ab­ling XML ser­vi­ces for cus­to­mer needs based on XMLdation tools.

    Order Newsletter