One of the first actions a template designer has to take when starting a new template is to add the schema of the data source. The operation is simple as long as you have the URL of the schema readily available as manually entering the URLs is not an option in most cases.
For this reason I used to keep a text file on my desktop with all the URLs of the schemas that I needed for test&support activities. RPE 1.3 offers a better solution with the predefined data source schemas.
Using the predefined data sources
The predefined data sources schemas is implemented as a list of human readable labels associated with URL patterns. The above image shows the values that come out of the box with RPE 1.3.
Selecting a predefined data source will populate the “Schema” field with the URL associated with the name. For some of these data sources parts of the URLs, such as the host and port, are generic and must be edited to match the deployment of the data source in your location.
The name field is populated with the name of the predefined data source but you can change that as needed using the Name field.
Customizing the predefined data sources
The list of predefined data sources is limited and as mentioned above uses generic URL patterns which means you still need gto manually intervene each time you add a schema. To overcome this you can customize the list and add new entries, remove entries you do not need and replace the generic URLs with concrete URLs valid in your environment. Doing this will give you a 1 click “Add data schema” process.
The predefined schema list is stored as XML in %RPE_HOME%\config\RPEPredefinedDataSources.xml. The structure and instructions on how to edit this file are documented here.
NOTE: you do not need to restart Studio for the changes to take effect.
NOTE: I recommend copying and editing the xml file in a different location and then copying it back in the RPE_HOME\config folder to avoid the problem described in Editing files in system areas – UAC Data Virtualization pitfall.
NOTE: if you do not use an XML editor to make changes and use a plain text editor you should first open the XML in a browser to validate it’s still well formed.
To add the schema for DNG modules in the list of predefined data sources you need to add the following entry:
<predefinedDataSource> <name>DNG Module</name> <description>DNG Module Schema</description> <location>https://giediprime:9443/rm/publish/modules?metadata=schema</location> <type>Generic XML</type> </predefinedDataSource>
This gives the following Add Schema Dialog: