Plex 2E

  • 1.  ModelAPI v's XML Export?

    Posted Feb 11, 2018 07:26 AM

    G'day All,

     

    I've been looking at the ModelAPI and have begun building a set of processes to export objects and triples from a Local Model. I'm using CA Plex 7.2 and ModelAPI v3.0.

     

    I've noticed that the sequence of triples presented via the ModelAPI are different to that seen in the Model Editor - whereas the XML Export has the triples in the exact sequence as the Model Editor.

     

    I'm also having problems with inherited triples being retrieved by the ModelAPI - even when I use the "Is Triple Virtual" function it only returns "No" for all triples. So it makes it hard to determine what are the real triples for any specific object.

     

    Has anyone else experienced this?

     

    Regards,

     

    Darryl



  • 2.  Re: ModelAPI v's XML Export?

    Posted Feb 12, 2018 06:11 PM

    Got this wrong:

     

    "I'm also having problems with inherited triples being retrieved by the ModelAPI - even when I use the "Is Triple Virtual" function it only returns "No" for all triples. So it makes it hard to determine what are the real triples for any specific object."

     

    I thought "Virtual" meant it was defined from another library - whereas I have discovered "Virtual" means whether or not it is a "Real" object.

     

    Would be nice if there was a method determining if a triple is "Inherited" - as I can see a lot of triples being returned which are not visible in the Model Editor - and are there because of the expansion of "IsA" triples. I would like to ignore these triples when I am processing them - as I do not want to add or update them as part of the process I am trying to build.

     

    Here is the screen capture of the Model Editor for my Model entity:

    Triples as per Model Editor

    Here are the records created in MSSQL database for that same entity:

    Records created using ModelAPI

    I would like to differentiate between actual triples and those that are there because they are inherited.



  • 3.  Re: ModelAPI v's XML Export?

    Posted Feb 13, 2018 02:06 PM

    did all this in www.stellatools.com once apon a time. Learnt all things you are now learning..shame there seems no accepted way for us to stop re-inventing the wheel. Maybe programmers just like re-inventing the wheel



  • 4.  Re: ModelAPI v's XML Export?

    Posted Feb 13, 2018 02:31 PM

    you should look at TriplesForObject - Stella Tools (CA Plex Developer Tools) 

     

     

    isTripleVirtual Method

    Returns whether a triple is virtual (implied) or not, given a pointer to the triple. True is returned if the triple is virtual, otherwise false is returned.



  • 5.  Re: ModelAPI v's XML Export?

    Posted Feb 13, 2018 02:42 PM

    Yep - I'm calling the method to determine if the triple is Virtual - but all triples in the model are set to "N" - as seen in the above screen shots I added.



  • 6.  Re: ModelAPI v's XML Export?

    Posted Feb 13, 2018 02:40 PM

    G'day George,

     

    So - have you resolved these issues with ModelAPI in StellaTools?

     

    I notice from your other post and the link that you seem to use "safearray" enums - whereas I have just been using the normal enums.

     

    I'm trying to build an inventory of all objects and then expand them to develop a full cross-reference and usage database - similar to what you can get in CA 2E - which can then be used for impact analysis and what-if analysis. I don't believe StellaTools does this - from what I have looked at - otherwise I would be using that.

     

    I have plans to further extend this to do other things that Plex currently does not provide - as it has stagnated and lacks more contemporary tool capabilities - such as "Search and Replace" capability in the whole model.

     

    Regards,

     

    Darryl



  • 7.  Re: ModelAPI v's XML Export?

    Posted Feb 13, 2018 02:56 PM

    Stellatools has all the building blocks..the gets the updates etc..the lego blocks

     

    I have search but choose not to add the replace as thought it too radical to change stuff outside of the model..model api was too radical at the time and adding update was too much for most..but actually all getting too long ago as I started it in 2011..wow..

     

    Good luck with your endeavors.

     

    isTripleVirtual Method  I am now not sure if it signifys
    • Real or Not
    • Inherited or Not

     

    If I was tasked with you issue of impact analysis I would say XSLT is you best friend over the Model Exports.



  • 8.  Re: ModelAPI v's XML Export?

    Posted Feb 13, 2018 03:00 PM

    BUT I was also guilty of re-invention as I stole everything from 12B - PlexAPI_Austin.ppt  



  • 9.  Re: ModelAPI v's XML Export?

    Posted Feb 13, 2018 03:05 PM

    and here is your answer and me learning what you are in 2010....  https://communities.ca.com/message/9667344



  • 10.  Re: ModelAPI v's XML Export?

    Posted Feb 16, 2018 04:39 AM

    I was using the sample model functions and the "Is Triple Virtual" function has not been implemented correctly and the parameters mapped on the API call are wrong. I changed these and now I can determine if a triple is inherited or not.