About writing Gosu data change code
The first stop in using the Production Data Fix tool is to write Gosu code that does the following:
- Correctly and safely makes only necessary changes to the production data
- Persists the changes to the database
Warning: Carefully test your data change
code. Guidewire strongly recommends that multiple people review and approve
the code for safety and correctness before proceeding.
To persist changes to the database, use the gw.Transaction.Transaction class and its method runWithNewBundle. You pass the method a block that runs code. If the block does not throw an exception, PolicyCenter persists any data changes from your Gosu block to the database. If the block throws an exception, no changes persist to the database.
Design your data change code to minimize the number of entity instances you change. Too many changes in entity data increases the chance of memory issues or concurrent data exceptions.
Save your Gosu code to a local file that
ends in .gsp.
See also
