cancel
Showing results for 
Search instead for 
Did you mean: 

Passing Object Names Dynamically in Catalog Query MII 14.0.2

Former Member
0 Kudos

Hi all,

I have been trying to see if there is a way to dynamically pass Object Names to the Catalog Query.  My goal is to able to at runtime of a transaction pass an Object Name (namespace) in the Catalog as a parameter to run a 'RetrieveProperties' query on it.  Such as passing "CatalogConnector.Root.ProductionUnit.EquipmentTag1" as a parameter in the Query.

I see that the BOBJ integration with MII 14.0 seems to have a parameter named 'ObjectName.1-xx' where in BOBJ one can dynamically specify the Object Name one wants to run a query on.  That same parameter does not exist in the Catalog Query action block in BLS.

The benefit of having this is we have properties for a particular tag stored at different levels in its namespace, such as ProductionUnit has generic properties applicable to all child tags within that Production Unit so instead of storing it as a property of each tag we store it in a parent namespace group.  To extract this currently we are having to climb the namespace and run a GetGroupDetails WS every step, but that is very inefficient compared to being able to after climbing the namespace pass the different parent groups as parameters in a Catalog Query to retrieve all relevant properties in a single query.

Thanks,

Joe

Accepted Solutions (1)

Accepted Solutions (1)

former_member211944
Active Participant
0 Kudos

Hi Joseph,

As earlier mentioned by Tufale, Catalog Query expects the selected PIC objects(Groups and Tags) using the parameter "SelectedObjects". You can give the namespaces of the objects using this parameter as a comma separated string. Remember complete namespace of the object should be used.

For getting properties you could use the "RetrieveProperties" mode of catalog query.This mode is specifically for this purpose i.e. getting the value of the properties of PIC Objects.

For the selected Properties of the PIC Object use this parameter: "ETCQueryPropertiesInfo".

This parameter is of XML type and contains all the selected properties information.

This is the syntax of the XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<ETCObjects>

<PropertiesSelectedForAll>

<Property name = "---" PropertySetName = "---" />

<!-- You can add any number of properties here-->

</PropertiesSelectedForAll>

<ETCObject name = "---">

<Property name = "---" PropertySetName = "---" />

<!-- You can add any number of properties here-->

</ETCObject>

<!-- You can add any number of ETCObjects here-->

</ETCObjects>

In this mode you can select properties in 2 ways:

1. Property selected for all - this means that the property is selected for all the PIC Object in the query and value would be fetched for all the objects.If the property is not present for some PIC Object, then no exception would be given, just that value would be skipped.

2. Property selected for a PIC Object: this means that the property is only selected for the specified PIC Object.

Thus the XML should be in above mentioned format.

Regards,

Rohit Negi.

Former Member
0 Kudos

Thanks for this, I have it working.

It appears to be a gap in the Catalog Query in the Link Configuration in which ETCQueryPropertiesInfo does not appear on the list of parameters to overwrite in the Link Configuration screen.  I created a link manually to the parameter 'ETCQueryPropertiesInfo" for the Catalog Query and it successfully overwrote the parameter with my new XML property and returned the correct results.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Joseph,

  Catalog Query has a parameter called "SelectedObjects" which can take in tag names dynamically. For example, if you are running the query through a URL, then your parameter would look similar to

SelectedObjects = CatalogConnector.Root.ProductionUnit.EquipmentTag1, CatalogConnector.Root.ProductionUnit.EquipmentTag2,..

The tag names are passed are comma (,) seperated values.

However, in BOBJ,  the parameters ObjectName.xx is merely a place holder for the UI. If the BOBJ connector has to pass tags dynamically, then it might as well be using the same SelectedObjects parameter to pass the input.

I am not sure about retrieve properties.

According to me,

The retrieve properties mode in catalog query, will only query the value of the properties. You would anyways have to pass the property names to the query.

any thoughts ?

Regards

Tufale Ashai