‎19-03-2015 01:16 PM
For example the IT Cityplan area MetaClass has the MetaAssociation "Hosted Element". We now want to get only the hosted elements of the MetaClass "Application" using Java API. How can this be done?
cpa.getCollection("Hosted Element")
returns a MegaCollection of a generic MetaClass with multiple SubMetaClasses (For example Application, Server, Database, etc.)
Solved! Go to Solution.
‎19-03-2015 02:11 PM
Thanks for your reply. The Javadoc marks getType() as deprecated but says that filter() is the way to go. Thus
cpa.getCollection("Hosted Element").filter("Application")
does the trick in the example provided above.
‎19-03-2015 02:02 PM
Hello alros
You should us GetType to filter the collection.
Example (VB script)
Set cBE = GetCollection("~JW7j6VRt9H40[BPMN Element]") Print "Number of BPMN Element objects: " & cBE.count() Set cOP = cBE.GetType("~gsUiU9B5iiR0[Organizational Process]") Print "Number of Organizational Process objects: " & cOP.count()