I'm attempting to add a ControlledFile (used by our Wizard) via the Java API but I am not having much luck. I have tried a few of the techniques I've read in the forums, but still little progress. Recently I have tried something like:
IRPModelElement me = myRhapProj.addNewAggr( "ControlledFile", "My XML File" );
This alone will create a ControlledFile element name "My XML File" in the Rhapsody project exactly as expected. However, if I attempt to cast to IRPControlledFile to change the file path
(IRPControlledFile)me.setFilename( "some/path" );
I get an "unspecified error" message - no exception, just this error msg.
Also, when I call myRhapProj.getControlledFiles(), I always get a container of 0 elements. I see the controlled file in the package in Rhapsody (albeit with an incorrect file path), but when I try to extract with getControlledFiles() I do not see any of the files I've added via Java API.
Any help would be greatly appreciated.
This topic has been locked.
1 reply Latest Post - 2012-10-24T16:23:02Z by ZvikaV.
Pinned topic Adding a Controlled file (custom XML schema) using Java API
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-24T16:23:02Z at 2012-10-24T16:23:02Z by ZvikaV.