Upgradability best practices
Guidewire recommends a number of best practices to help prepare your PolicyCenter installation for future upgrades.
Add minor changes directly to base files
Whenever you make only minor changes to a file, make them directly within the base file. If the file changes in a future release, you can accept or reject the changes during the upgrade. Your changes and the changes in the new release are visible side-by-side within your three-way merge tool while you merge the upgrade code manually.
Copy base files to add major changes
Whenever you make major changes to a file, make a copy of the file. Name the copy of file the same as the original, with the customer identifier inserted. For example, make a copy of SomeBaseScreenDV.pcf and give it the name SomeBaseScreen_ExtDV.pcf.
In the original file, add a comment at the top that states you copied the file to make major changes, and include the filename of the copy. For example:
<!-- This file was copied to SomeBaseScreen_ExtDV.pcf -->If the file changes in a future release, you will notice that the file was copied. You then can decide whether to replicate the changes in the new file in your copy of the base version of the file. Especially if the change enhances the base file or fixes a defect, you may want to apply the same changes to your copy of the file.
Copy base functions to make major changes
Whenever you make major changes to a function,
or method, defined in a Gosu class, make a copy of the function and place
it in a customer class. Give the copy of the function the same name as
the original, with the customer identifier as a suffix. For example,
make a copy of SomeBaseFunction
in a folder within your customer package, such as com.Customername. Name
the copied function SomeBaseFunction_Ext.
In the original function, add a comment at the top that states you copied the function to make major changes. For example:
// -- This function was copied to SomeBaseFunction_Ext --To confirm that you changed all existing code to use your copied function, temporarily rename the original function and then compile your entire project to check for compilation errors. After you remove all calls to the original function, consider commenting out the original function to prevent developers in the future from using it accidentally.
If the function changes in a future release, you will notice that the function was copied. You then can decide whether to replicate the changes in your copy of the base function. Especially if the change enhances the function or fixes a defect, you may want to apply the same changes to your copy of the function.
Switching from minor to major changes
About this task
After you make minor changes to a file or function, you might decide to make additional major changes to the same file or function. If you switch from making minor changes to making major changes, switch from the recommendations for minor changes to the recommendations for major changes.
Procedure
-
Rename the base file or function
by including the customer identifier.
For example, make a copy of SomeBaseScreenDV.pcf and give it the name SomeBaseScreen_ExtDV.pcf.
- Restore the original base file from base.zip or from your source code repository.
-
Add a comment to the top of the restored
base file or function to state that the file or function was copied.
For example:
<!-- This file was copied to SomeBaseScreen_ExtDV.pcf --> - Make your additional major changes to the copy of the file or function.
