How to query UML models with OCL?

Hello everyone,
I am working on using OCL to query UML models.
Besides diverse examples, I don't know how certain UML metamodel elements are accessed via OCL when an instance model is given.
Where am I supposed to look after this information?

Hi
Perhaps you want
Transition.allInstances().extension_ensureRole->excluding(null).role
Regards
Ed Willink
On 17/07/2015 10:58, Jens Bürger wrote:
> Thanks,
>
> so for now I will use Mars.
>
> I managed to get close to what I want in a first test case.
> I have a state chart and a transition with a stereotype <<ensureRole>>.
> This stereotype has a tagged value "role" which is represented as a
> String array. The actual only element is "a=b".
>
> I use the following query:
> Transition.allInstances()->select(t |
> t.getAppliedStereotypes().name->includes('ensureRole')).getAppliedStereotypes().getAllAttributes()->select(x|x.name='role')
>
> The result is:
> ensureRole::ensureRole::role
>
> So how can I access the tagged values?
> The respective part of the .uml-file looks like this:
>
> ..
> </uml:Model>
> <ensureRole:ensureRole xmi:id="_e75g0Cu0EeWNw6GF_Fgubg"
> base_Transition="__AaxQIRzEeSbXcAiNcJFPQ">
> <role>a=b</role>
> <role>x=y</role>
> </ensureRole:ensureRole>
> </xmi:XMI>
>
>

Similar Messages

  • Query on Papyrus UML models with applied profiles

    Hi everyone,
    I'm using IncQuery for detecting changes on Papyrus UML models.
    My UML models are applied with UML profiles created by Papyrus.
    How can I query on models applied profiles that have the same stereotype name. How to distinguish stereotype name and UML model element name in queries?
    For example, there is Connector and in the applied profile, there is also a stereotype named Connector. How can I use prefix name for this kind.
    Thanks.

    Since 1.0.0, you can name imports and use the name as a prefix for types:
    import "umlNsUri" as uml;
    import "myProfileUri" as profile;
    pattern someP ( myParam : uml::Connector, myP2 : profile::Connector) {...}

  • How to query Opentype fonts with Contextual Alternates

    Hi,
    I am using the C++ API for Indesign CS4.
    Is there a specific way to query Opentype fonts with contextual alternatives? The method that I use right now results in special reserved characters being outputted. It works however, for other Opentype fonts that do not use contextual alternatives. I am wondering if this is due to me not querying the right object or possibly something I am doing with the text's encoding.

    I tried to use the AFDKO's CFFChecker program, but i get the following error each time I want to run it:
    "File "F:\Tools\AFDK\FDK1.6-Win4\Tools\Programs\tx\exe\CFFChecker.py", line 46, in ?
    from txlib import *
    ImportError: DLL load failed: The specified module can not be found."
    What does the error mean? I followed the installation instructions, I repeated the installation process but it did not work. What else can I do?...
    Thanks in advance...

  • How to query a dimension with mulilingua attributes

    I have creates a dimension having multilingual attributes. I would like to know how can I access these attributes.
    For Example: the dimension name is EMPLOYEE, and the attribute is EMP_NAME both in English as well as ARABIC or FRENCH. Now how can I populate these columns in my application through quering these vies.

    The database returns values based on the language of the client. E.g., if the client is Arabic and Arabic is a language of the analytic workspace (AW), then the DB will automatically return the Arabic attribute values.
    You add a language to the analytic workspace from the Languages node on the object tree. After than is done, you can provide translated versions of the model (e.g., the short label, long table and description of all the dimension, levels, attributes, cubes, measures, etc) in the languages table.
    Attributes are made multilingual by choosing the "Attribute values are multilingual" option on the attribute and mapping the attribute to columns in dimension tables with the appropriate language.

  • Help on how to query 11g table with XMLType column

    To all,
    We have this table:
    DESC MESSAGE
    Name Null Type
    MESSAGE_ID NOT NULL NUMBER(38)
    REQUEST_UU_ID NOT NULL VARCHAR2(50)
    MESSAGE_TYPE_CD NOT NULL CHAR(3 CHAR)
    EMPLOYEE_NUM NOT NULL VARCHAR2(8)
    SEQUENCE_NUM VARCHAR2(20)
    REVERSAL_SEQUENCE_NUM VARCHAR2(20)
    TRANSACTION_TS TIMESTAMP(6)
    MESSAGE_CONTENT_TXT NOT NULL XMLTYPE()
    CREATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    CREATE_BY_TS NOT NULL TIMESTAMP(6)
    LAST_UPDATE_BY_NM NOT NULL VARCHAR2(50 CHAR)
    LAST_UPDATE_BY_TS NOT NULL TIMESTAMP(6)
    Given we have multiple columns and one is XMLType how do I query to find rows in the db that match this XPath
    Here is a fragment of XML that is held in MESSAGE_CONTENT_TXT XMLType column:
    <?xml version="1.0" encoding="UTF-8"?>
    <cfg-env:Envelope xmlns="http://www.co.com/schemas/CFX/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.co.com/schemas/cfg-env/" >
         <cfg-env:Header>
              <cfg-hdr:MessageHeader xmlns:cfg-hdr="http://www.co.com/schemas/cfg-hdr/" xmlns:cfg-env="http://www.co.com/schemas/cfg-env/" xmlns="http://www.co.com/schemas/CFX/">
                   <cfg-hdr:Service>
                        <cfg-hdr:ServiceName>process</cfg-hdr:ServiceName>
                        <cfg-hdr:MessageType>Request</cfg-hdr:MessageType>
                        <cfg-hdr:ServiceVersion>1</cfg-hdr:ServiceVersion>
                   </cfg-hdr:Service>
                   <cfg-hdr:From>
                        <cfg-hdr:PartyId>13-175-8724</cfg-hdr:PartyId>
                        <cfg-hdr:CostCenter>2009065</cfg-hdr:CostCenter>
                        <cfg-hdr:System>
                             <cfg-hdr:Application>[email protected]</cfg-hdr:Application>
                             <cfg-hdr:Version>1.0</cfg-hdr:Version>
                             <cfg-hdr:Channel>TLR</cfg-hdr:Channel>
                        </cfg-hdr:System>
                        <cfg-hdr:OrigReplyToQMgr>QMBKRD01</cfg-hdr:OrigReplyToQMgr>
                        <cfg-hdr:OrigReplyToQ>Q1</cfg-hdr:OrigReplyToQ>
                   </cfg-hdr:From>
                   <cfg-hdr:UserSession>
                        <cfg-hdr:SignonRole>User</cfg-hdr:SignonRole>
                        <cfg-hdr:LogonId>R099999</cfg-hdr:LogonId>
    I'm trying to find rows in the database that are /Envelope/Header/MessageHeader/UserSession/LogonId/R099999.
    Thanks for the assistance. I'm new to XML DB. I appreciate the help.
    Eric

    Hi Eric,
    You can use XMLExists, like this :
    select *
    from message t
    where xmlexists(
          'declare namespace env = "http://www.co.com/schemas/cfg-env/"; (: :)
           declare namespace hdr = "http://www.co.com/schemas/cfg-hdr/"; (: :)
           /env:Envelope/env:Header/hdr:MessageHeader/hdr:UserSession[hdr:LogonId=$id]'
           passing t.message_content_txt
                 , 'R099999' as "id"
    );

  • Forms 6.0 how to query clob column with oracle 9.2 DB

    hi every body,
    i made install for oracle 9.2 oracle DB every thing goes ok but when i made query in my form version 6.0 which have CLOB column the form closed automatically without any message?
    and just for know when i run the same form with oracle 8.1.7 DB the form made query normally without any problem.
    i want your help please.
    Message was edited by:
    mshaqalaih

    I know there was a problem in 6i where you would get a crash if your query returned more than {Max Length} characters of the field representing the CLOB column.

  • How to query on tables with certain name?

    Hi,
    I need to programmatically query some logging tables and then generate a report. These logging tables are all named E$_*. These E$_* tables have some common columns and some non-common columns. I don't know how many tables and what their full names are before hand.
    What is the best way to do the query? And ideally, the query is database platform independent.
    Thanks in advance!

    Hi,
    I need to programmatically query some logging tables
    and then generate a report. These logging tables are
    all named E$_*. These E$_* tables have some common
    columns and some non-common columns. I don't know how
    many tables and what their full names are before
    hand.
    What is the best way to do the query? And ideally,
    the query is database platform independent.Hi,
    What do u mean by database platform independent? What are your expectations. Any examples? Also please post what you tried, so that we can try to correct it.
    Jithendra

  • How to query microsoft access with DDE Request?

    Hello,
    We are trying to save the results of calibration tests to access database and include a search tool inside the labview to find specific results based on the part number of the tested device. So far we have accomplished writing data into the access database using the examples of labview. My question is that is there any way to send a query to microsoft access and recieve the results inside the labview? For example send a query with a specific criteria on the part number and recieve the results for that part number.
    Thanks in advance
    Pouya

    Why would you be using DDE. That microsoft technology is obsolete and has not been used/supported in quite a few years. Instead, look at the Database Connectivity Toolkit or LabSQL. There are also numerous posts on ADO (the technology behind both). Do a search.

  • How to query from view with parameter, only  when the JSP-page loading

    I use JSF/ADF BC, create two viewes:view1 and view2, in the JSP page the user press a button to query from the view1, but I hope the view2 can be queried only when the page loading, it have no relation with user-operator, and pass the column value of view2 into some variables, the view2 return one record.

    Hi -
    You may want to have a look at this other thread:
    Re: Execute ViewObject with Parameters at JSF Page Load?  JSF/ADF/BC 10.1.3
    John

  • How to query berkeley db with multiple keys

    Hi all,
    Is there a way to query a berkeleydb using multiple keys. For example, I want to query a order record with orderID and orderDirection, orderID is a string and orderDirection is a char.
    Is there a way to do so?
    Regards,
    -Bruce

    Hi Bruce,
    Yes, you would use the same approach with a join cursor.
    Here is a simple example, simplified for brevity. Suppose the primary database "books" stores information about books, and that these books could have multiple authors. Following is some example data and the structure of these databases:
    books.db (primary db -- ISBN is primary key)
    isbn_1 | {author_1, author_2; ...}
    isbn_2 | {author_2; ...}
    isbn_3 | {author_1, author_3; ...}
    booksAuthors.db (secondary db -- author is the secondary key, the secondary key extractor generates multiple keys)
    author_1 | isbn_1
    author_1 | isbn_3
    author_2 | isbn_1
    author_2 | isbn_2
    author_3 | isbn_3
    To get the books authored by author_1 and author_2 for example, you would do the following:
    - position a cursor in the booksAuthors.db secondary db, using DBcursor->get() with the DB_SET flag, on the records whose key (secondary key) is author_1;
    The cursor will be positioned on the duplicates list for author_1:
    author_1 | isbn_1
    author_1 | isbn_3
    - position a cursor in the booksAuthors.db secondary db, using DBcursor->get() with the DB_SET flag, on the records whose key (secondary key) is author_2, hence duplicates list for author_2:
    author_2 | isbn_1
    author_2 | isbn_2
    - create a join cursor using DB->join, using the previous two cursors.
    An excerpt from the above documentation page explains the way a join cursor works:
    "Joined values are retrieved by doing a sequential iteration over the first cursor in the curslist parameter, and a nested iteration over each secondary cursor in the order they are specified in the curslist parameter. This requires database traversals to search for the current datum in all the cursors after the first."
    Hence, the data item (primary key from the primary db) that results is isbn_1.
    Regards,
    Andrei

  • How to load .wrl model with its texture??

    I can sucessfully add some .wrl models on the scene,but its texture cannot be shown(the path of its texture is correct)...i want to know why??

    hi...
    i think better you check at the directory of file you want to use... Example: url for the texture ....
    Transform{ #start road
    children [
    Shape {
    geometry Box { size 500 .05 50 }
    appearance Appearance{
    texture ImageTexture { url["pic\road1.jpg"] }
    #textureTransform TextureTransform {rotation 90}
    translation 925 -1.7 -550
    }#end road 14
    hope can help you

  • Weblogic Portal UML Modeling

    hello,
    Could you give me an example of UML Modeling with BEA Weblogic Portal Framework?
    I have no idea how to match InputProcessors,PipelinesComponents ans EJBComponents
    to build up UML Diagrams for my project .... any suggestions?

    What is the objective of this modeling? Documentation? Communication?
    Architecture? Design?
    I would do the following:
    o Model EntityBean components as the classic UML domain model
    o Model SessionBeans / PipelineComponents as process / controller classes
    o Model InputProcessors as almost interface classes
    (See Jacobson: Robustness Analysis:
    http://www.cs.hmc.edu/courses/2002/spring/cs121/slides06.6.pdf)
    The most important artifact is the UML domain model...
    You can also then draw sequence diagrams bringing together these different
    types.
    "rogelio carrasco" <[email protected]> wrote in message
    news:3ee8d3b5$[email protected]..
    >
    hello,
    Could you give me an example of UML Modeling with BEA Weblogic PortalFramework?
    I have no idea how to match InputProcessors,PipelinesComponents ansEJBComponents
    to build up UML Diagrams for my project .... any suggestions?

  • UML modeller is so buggy that it's almost useless

    Looks like JSE 8 is released without quality control, at least the UML modeller part of it. I have been now trying to draw one complex sequence diagram 4 hours. Elements jump around randomly, lines go to wherever they want, sometimes you cannot assign label to messages, sometimes you do.
    There is no undo. After you have 12 elements and you do something which makes layout manager suddenly go haywire giving elements random positions, you cannot undo. Draw those 12 elements again. Now, imagine the situation with 50 elements.
    The last straw that broke camel back was that after I finally got my diagram "almost readable state" saved it and reopened it, the formatting was totally broken. All work lost. Here is a screenshot:
    http://www.ee.oulu.fi/~moo/sun_just_cant_do_it.JPG
    Hell, I would have been finished in half of a time with MS PowerPoint and have some WORKING documents in my hands.
    Sun follows its tradition and fails to ship decent desktop software. If you plan to do UML modelling with JSE8 and your UML model contains more than four boxes, forget it. They say they are giving 1300$ worth of software for free. I wouldn't use this tool for any serious work even if they paid me 5000$, since I'd rather work without headaches and it's no good to tell your client "sorry, couldn't do it since my software development environment just ate the plans".

    First of all, thanks for your feedback.
    (It would have been much better if it was a bit softer in tone :) )
    This issue has been reported earlier on the forum, and we addressed it. We fixed many issues with sequence diagrams. They will be available to you in our next TPR (TPR3) releasing very soon.
    In a situation where we don't have a scheduled TPR in the near future, we can provide you with a patch. And, It is always a good idea to browse the forums to see if the issue has been reported earlier and any workarounds posted in response.
    We always welcome constructive feedback (with a positive attitude :) ) and try our best to address the issues and make our tool better.
    Thanks
    Jyothi.

  • Fill model with tabledata

    Hi everybody,
    Can someone please tell me how to fill a model with data from a table? I am near to desperation.
    The problem is: I have a model constructed from a R/3 function module. The function module defines some import parameters one of them is a table.
    My idea was to first create a new instance of the model input class then set all the import parameters, bind the model to a model node in context and finally execute it.
    Well, there is no problem with the simple import parameters (just three strings have to be set). But when I try to set the "table parameter" I get some trouble. The "set" method for this parameter only allows to set an object of type "AbstractList" (which is NOT java.util.list). There is also an "add" method for this parameter but trying to use this ends up in an "ArrayIndexOutOfBoundsException" (java.lang.ArrayIndexOutOfBoundsException: -1).
    I wonder now how to fill up the "table" parameter with data. Can someone please tell me the "usual" way?
    Thanks in advance for all answers!
    Regards,
    Torben

    I found a very good posting from Betran Ganz (initializing AbstractList Model in Custom Controller)

  • Mapping Code to Design with UML Modelling

    Hello
    I want to know if I could map code to design automatically with using UML modelling function using JDeveloper 10.1.3? What I mean is... I know I could transform Java classes from Class Diagram, but, how about mapping code automatically with Sequence Diagram? By the way, what is the main function provides to us for other diagrams besides Java Class Diagram? Thank you.
    Charoite

    You can create a sequence diagram from a debugger session in JDeveloper by adding a breakpoint to your existing code and then picking Debug -> Debug with diagram. Every time you step into a class the sequence diagram will update, you can then save the diagram after ending your debug session and edit it from publication.
    JDeveloper does not support creating java code from the sequence diagram.
    Thanks,
    Geoff

Maybe you are looking for

  • Configuring Lync Server 2013 to be a partner Application for Exchange 2013

    Hello Guys, I just want to share my experience while configuring Lync server 2013 to be a partner Application for exchange 2013 sever.  As mentioned on technet you need to run Configure-EnterprisePartnerApplication.ps1 script that ships with Exchange

  • Convert files to PDF in asp

    I need a web application (asp page) that can combine four files (tif, xfd, pdf, html) into one pdf file and stream it back to the user. These files are sitting on an IIS 6.0 server. I have Adobe acrobat 8 professional and was able to convert all the

  • Seem to be receiving Multiple announcements of same post.

    This is different than just receiving announcements of threads in which clicking on each succeeding link show a new thread at the end of a Topic (which is correct). what I am getting is up to thre or four times I am seeing exactly the same thread, wi

  • List box printing query

    Hi all! I have just started using Adobe Acrobat Pro 9, and am trying to use list boxes. The problem I'm having is this: Say I create a list of 20 options, allow mulitselect, and select 5 of them. Is there any way to set it up so that when you print,

  • Tablespace threshold alert

    Hi, I executed the below procedure to implement the tablespace threshold for the tablespace 'TESTING'. My doubt is, once the threshold reaches where will I get the message like the tablespace 'TESTING' has only 51200 KB left. Database:10.2.0.4 OS: so