Zurück zu Willert.de

Accessing "AllocatedFrom" operations via Java API

how to access or perform things by using the Rhapsody API (not how to use the UI)

Accessing "AllocatedFrom" operations via Java API

Postby MadParrot » June 15th, 2014, 2:58 pm

Hi,
I need to customise a generic Internal block diagram to show customer specific variants. A simple tag based discrimination mechanism is used to suppress non relevant flows and allocated operations.
I have written a Java plug-in to iterate over the IBD’s encapsulated IRPGraphElements, examining their associated type and acting appropriately.
Manipulation of the flows is working fine but I am having a lot of problems with the allocated operations – in summary I have 2 problems…
1.) I cannot get a handle to the “AllocatedFrom” compartment
2.) and therefore I cannot get to the IRPCollection containing the references to the actual operations.
Problem 1.
I have examined both the Rhapsody Java api documentation (!!!) and Java objects at runtime trying to discover the appropriate method(s) to invoke.
As it is a purely presentational issue (I do not want to suppress underlying allocations between model elements) I guess it is some kind of graphical property & I had thought it would be ObjectModelGe oriented.
I have looked at the properties mentioned in the Diagram package of the SysML profile.
Within General::Graphics” I can see the “AdditionalCompartments” property mentions (amongst other things) ‘AllocatedFrom’
However within ObjectModelGe::Object” I see that the “Compartments” property only mentions “Operation” – do I need to add ‘AllocatedFrom’ to this property?
Problem 2.
Even if I get access to the compartment I am not sure what methods will be available to access the collection – there appears no interface defined for compartments. Looking in the .sbs file I can see that it is of type IRPYRawContainer but I cannot find any documentation on this.

Any help/suggestions are most welcome

Cheers Rod
MadParrot
 
Posts: 1
Joined: June 15th, 2014, 2:55 pm

Accessing "AllocatedFrom" operations via Java API

Postby Bingomaster » November 25th, 2014, 3:58 am

I am trying to retrieve a document from the M-Files API via the documentID. I have code, like below, making the call:


ObjectVersion docNewestVersion = null;
ObjVer objVerNewest = new MFilesAPI.ObjVer;
objVerNewest.SetIDsintMFilesAPI.MFBuiltInObjectType.MFBuiltInObjectTypeDocument, fileID, -1;
docNewestVersion = vault.ObjectOperations.GetObjectInfoobjVerNewest, true;


This works for most documents. However, sometimes I get a "Not Found" message when trying to retrieve a document that I know is there. How do I resolve this issue?
Asi es -suspiro el coronel-. La vida es la cosa mejor que se ha inventado
User avatar
Bingomaster
 
Posts: 6
Joined: May 25th, 2014, 2:51 pm


Return to Rhapsody API

Who is online

Users browsing this forum: No registered users and 2 guests

cron