When code generation is performed, files are created that reflect the names of elements present in the MDM development models.
In addition to files named after these elements, references to these names also appear within the files in the form of method or variable names and so on.
During the development cycle, model changes must be reflected in the generated code. Where elements are renamed or deleted, the files must be changed accordingly. This maintenance process is performed each time code generation takes place and is the first step in the process. Depending on the nature of changes to MDM development models, this maintenance process can result in the following activities:
When code generation is performed, the files present in the workspace are examined to locate any files that need to be updated as a result of model changes. These files are then presented in a dialog allowing you to examine the list and deselect any files you wish to keep and process manually. Selecting Update will process the checked files as required before continuing with code generation. Selecting Skip Update will prevent any updates from occurring and simply proceed to code generation.
The information is presented in a tree structure with elements that cause the maintenance to be necessary presented at the top of the tree. Expanding the tree shows the files that will be updated.
In some cases, the removal of a specific file then requires other files to be removed from the workspace. The effect is groups of files that must be removed together if they are to be removed at all. This is reflected in the tree structure where this grouping is reflected and enforced.
If the file to be deleted has been edited, the maintenance process will archive the file prior to its removal. The archive file name reflects that of the original file with a postfix added to the end.
The Backup customized files option is available in the maintenance wizard and selected by default, but it but can be disabled if required.
Just as with code generation, modified files must be identified with @generated NOT within the file
In addition, the contents of each file is checked for a special marker in a comment line, which was added when the file was first generated.
An example of such a marker follows:
// IBM-MDMWB-1.0-[d3e9f90d3d26ea424db7f984d2afafef]
The marker represents a link from the generated file back to the MDM development model element, which caused the file to be created. Older versions of the workbench did not generate this comment line.
Files identified for maintenance that have a valid marker comment line will be included in cleanup by default and preselected for processing.
Files identified for maintenance that do not have a valid marker comment line can be optionally included in the cleanup by enabling the Include potentially redundant artifacts that could not be verified automatically option in the maintenance wizard. Once this option is selected you must then manually confirm those files you want to process.
To disable automatic maintenance, open the InfoSphere Master Data Management tab and disable Always update workspace automatically.
menu, select the