Dynamic Datasource Configuration For Module/Text in DNG
Hi,
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
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.
Comments
Thank you, and that would indeed fix the problem for me, but is there a way I can do this in 6.0.6.1?
In 6.0.6.1, 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>
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.