The PG (QPR Modeling Client) object contains functions for retrieving information from QPR Modeling Client models.
Functions available for the PG object:
•Product: All folders and published models.
•Folder: Folders and models in that folder.
•Model: All the objects in the model.
•Subprocess: All the model objects linked to the diagram, all the model objects in the child diagram.
•ModelObject: All the model objects linked to the model object.
ChildObjects (hierarchy=<hierarchy name>)
•Product: Models and folders in the top level of the model hierarchy.
•Folder: Folders and models in that folder.
•Subprocess: All the child diagrams in this diagram.
•OrganizationUnits/Notes/InformationItems/Resources: All the sub-objects in given hierarchy. If resource pools are to be used instead of resource groups, "hierarchy=resourcepools" must be given as parameter.
ParentObjects (hierarchy=<hierarchy name>)
•Folder: Parent folder (if any).
•Subprocess: All parent diagrams of this diagram.
•OrganizationUnits/Notes/InformationItems/Resources: All parent objects in given hierarchy. If resource pools are to be used instead of resource groups, "hierarchy=resourcepools" must be given as parameter.
•Product: All folders.
•Folders: All folders in the folder.
•Product: All models.
•Folder: All models in the folder.
•Product: All root models.
•Folder: All root models in the folder.
•Product: All branches.
•Root model: All branches in the root models.
•Product: All model versions.
•RootModel: All model versions in the root model (not recursively from branches).
•Branch: All model versions in the branch.
•Model: All element types.
•Connectors: Model element at the start of the connector. From can be used also as an attribute for a query targeting a connector.
•Connectors: Model element at the end of the connector. To can be used also as an attribute for a query targeting a connector.
•Element types: All elements belonging to this element type.
•Model: Element matching the defined symbol.
AllowedTargetTypes([relation=<relationname>], [connectortype=<connectortypename>, [direction=incoming|outgoing]])
This relation can be used to query the possible target types of a relation in an element type, or a connector coming in to/going out of an element type. This relation is available for EA element types and elements. When the relation is used with an element, it will actually invoke the relation on the element type of that element.
Relation parameter is used when querying a relation of an element type. For example: [PG.123.456].allowedtargettypes(relation="owner"); PG.123.456 is the ID of the element type and "owner" is the name of the relation to be queried. Connectortype is used for querying the allowed target types when it leaves from the element type and the direction parameter can be used together with connectortype to define the direction of the connector. If direction is omitted, it is outgoing by default.
Valid type names:
•<model object type group (corresponding attribute: typegroupname)>
•<model object type (corresponding attribute: typename)>
•<element type defined for the model (e.g. "Activity")>: If the name contains spaces, you can omit those. For example Core Process can be called as CoreProcess.
Valid relations by type:
oBaseModel: Base model defined for the model.
oChildModels: Child models for which the Model is a base model.
oInformationItems: Information items connected to the model object
oNotes: Notes connected to the model object
oResources: Resources connected to the model object
oElementType: Model object's element type
o<custom attribute relations>: Any custom attributes defined for the model object type.
oInstances: Instances of the object
oIncomingFlows: Connectors coming into the model object.
oOutgoingFlows: Connectors going out of the model object.
oMappedConnectors: For input and output interface elements, connectors mapped to the interface element.
•Connector model object
oFromInstance: Model object instance at the start of the connector
oToInstance: Model object instance at the end of the connector
oMappedSourceInterface: The interface element that is mapped to the connector start.
oMappedDestinationInterface: The interface element that is mapped to the connector end.
•ProcessLevels: Diagram hierarchy. If the IgnoreHidden parameter is set to true, the returned hierarchy does not contain diagrams set as hidden in the diagram hierarchy.
•OrganizationUnits: Organization unit hierarchy.
•InformationItems: Information item hierarchy.
•Notes: Note hierarchy
•ResourcePools: Resource pool hierarchy
•ResourceGroups: Resource group hierarchy.
•<element hierarchy symbol>: Element hierarchy with a matching element symbol.