Updating a Changed XML Schema

If you created a project that uses an XML Schema and the XML Schema changes, you can attempt to update the existing XML Schema with the new XML Schema.

About this task

Updating to a new XML Schema means that any of the project entities that interface with the XML Schema might be affected by the change. The following project entities can be affect by XML Schema change:
  • Maps that refer to the XML Schema, both stand-alone maps and the inline maps in activities.
  • Variables that refer to the XML Schema.
  • XPath expressions in orchestrations.
  • XPath expressions used in job keys.
  • Some Endpoint configurations.
  • Conditions defined in orchestrations.
During the update process, Studio reports which project entities are affected by the change before the change is committed.

For example, an XML Schema defines an input parameter to the Map Variables activity. In the From Orchestration pane of the Map Variables activity there are links between the nodes of the input parameter to the nodes of the output parameters. When the XML Schema that defines the input parameter is updated to the new XML Schema, those links might no longer be valid if the input nodes have been renamed or removed in the new XML Schema. You must recreate the links in order for the orchestration to be valid again.

In some cases, Studio completely prevents the uploading a new XML Schema for the following reasons:
  • The new XML Schema is invalid.
  • Uploading the new XML Schema to replace the existing one, would result in an invalid project.
Note: Updating an existing XML Schema (as described in the following procedure) is different from loading multiple XML Schemas into a project by either dragging a file into the Project tab or right-clicking on the XML Schemas folder in the Project tab and selecting Add Document. Updating an existing XML Schema replaces the existing XML Schema in the project while uploading the same file into the Project tab creates two instances of the XML Schema in the project.

Procedure

  1. Open the XML Schema that is already used in the project that is to be replaced by the new XML Schema. Open the graphical representation:
    1. Open the Project tab and double-click the XML Schema in the XML Schemas directory. The nodes of the XML Schema display in the XML Schema tab.
    2. In the XML Schema tab, click any node of the XML Schema.
  2. Select a new XML Schema to replace the existing XML Schema, using one of the following options:
    • In the graphic representation, you can drag an XML Schema file from the local file system onto the XML Schema open in the XML Schema tab.
    • Select the File > Update option on the Studio toolbar menu. The Update the Current Schema Document dialog box displays. In the Location field, specify the location of the new XML Schema from an external web location or from the file system.
  3. Click OK. The Updating the XML Schema Affects the Listed Dependant Project Entities dialog box displays and any project entities that are possibly affected by the replacement of the original XML Schema with the new XML Schema are listed.
  4. Optional: In the dialog box, click any of the listed dependent entities to view the affected entity in Studio.
  5. Click Update. Studio attempts to update the project with the new XML Schema and the result of the attempted update depends on the following conditions:
    • If any of the changes in the XML Schema would result in a corrupted project after the update or the new XML Schema is invalid, an Error dialog box displays describing the problem with the XML Schema. Click OK. The update is canceled, the XML Schema reverts to the original XML Schema, and the project is not changed.
    • If the changes to the XML Schema would not result in a corrupted project and the XML Schema is valid, the update occurs and the original XML Schema is replaced by the new XML Schema. Some of the project entities might be invalid after the update and might require clean up. For example, links in the Map Inputs and Map Outputs panes might need to be recreated after the update. To find the validation errors, open an orchestration and select Orchestration > Validate from the Studio toolbar menu.
  6. Click Close.



Feedback | Notices


Timestamp icon Last updated: Tuesday, 27 September 2016


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/updating_a_changed_xml_schema.html