It's all about the answers!

Ask a question

Dynamic Datasource Configuration For Module/Text in DNG

Glyn Costello (14045) | asked Feb 10 '21, 1:35 p.m.


For the Module/Text DTA template, the Dynamic Datasource configuration doesn't not consider whether the original Datasource was from a gobal configuration. How can I get the the Global Configuration information from the Document Spec and append it to the script which dynamically configures the Datasource when pulling the "Text" artifacts?

One answer

permanent link
Subramanya Prasad Pilar (4.6k16) | answered Feb 11 '21, 1:03 a.m.
Hi Glyn,
Global Configuration information from the document specification (that is, Configuration-Context property from the data source that is manually configured by RPE user) is propagated to the dynamic datasources as well. You need not explicitly set configuration information in Data Source Configuration element, unless you want to change/overwrite the configuration context. If you want to overwrite it, you can append oslc_config.context parameter to the URI.
Note: In RPE 7.0.3, you will find Configuration-Property for Data Source Configuration element, in case you want to use a different value than what is provided for inherited data source.

Glyn Costello commented Feb 11 '21, 3:33 a.m.

Thank you, and that would indeed fix the problem for me, but is there a way I can do this in 

Subramanya Prasad Pilar commented Feb 11 '21, 7:05 a.m. | edited Feb 11 '21, 7:06 a.m.

In, you can append oslc_config.context=cc to the URI property of the Data Source Configuration element.
You can get use
var cc = _sessionInfo.getDatasourceProperty( "<DSName>", "Configuration-Context", "");
to get the config.context for data source named <DSName>

Glyn Costello commented Mar 10 '23, 11:27 a.m.

 Hi, we're now on 7.0.2, but I still can't get the dynamic datasource configuration to work without explicitly copying and appending the configuration on the end of the datasource URI. 

i.e. I have a dsx file, configured the View datasource and stated the global config, it gets to the first Text artifact, where the below JS dynamically configures the _DNG Text datasource, 

var text = about.replace("/resources/", "/publish/text?resourceURI=");

But the publish fails at that point unless I explicitly add the configuration onto the end of the "about" attribute. 

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.