Refactoring overview

Refactoring involves making changes across a set of artifacts without changing the behavior of the application. When you make a change using refactoring, the program updates dependencies automatically across the application.

You can make many kinds of changes to artifacts by editing them in the editor view. However, such changes affect only the artifacts that you edit directly. Existing dependencies and references will fail unless you edit them as well. WebSphere Integration Developer provides a refactoring feature that identifies and updates dependencies and references when you rename an artifact, move an artifact, or change a namespace. For example, renaming a business object might also affect the business object physical resource, a referencing WSDL port type, and a referencing WSDL import statement. When you rename a business object using refactoring, the refactoring operation identifies such dependencies for you and makes the changes behind the scene so that you do not have to make them manually.

You can initiate a refactoring operation in many ways. The most straightforward way is to open a refactoring menu by right-clicking an appropriate artifact in the Business Integration view. The menu will indicate which refactoring actions are available for that artifact.

This screen capture shows the Refactor menu for a business object in the Business Integration view.

Wherever you initiate the action, a refactoring operation is carried out through a refactoring wizard. Each wizard has two pages. On the first page, enter the new name or namespace for an artifact or, if you want to move it, choose the new location. When you have made the change, click Preview. The second wizard page shows the dependencies that will be addressed by the refactoring operation.
This screen capture shows a list of changes that will be made through a refactoring operation.
You can clear a check box to cancel individual changes, but unless you know the structure of your application extremely well, accept all the changes. Click OK to initiate the refactoring operation or Cancel to close the wizard without making the change. Be aware that you cannot undo a refactoring operation once it is performed except by refactoring again.

If you try to refactor while you have unsaved changes in an editor, you will be prompted to save the changes in the editor. Save the changes if you are sure you want to do so, or click Cancel to reconsider the changes before saving the editors and refactoring.

Most refactoring operations can be initiated by right-clicking an object in the Business Integration view. There are two exceptions:

You can find more information about each of the refactoring tasks by selecting the appropriate related link from the following list. You can also find tips for successful refactoring in a technical document on the product support site at http://www.ibm.com/software/integration/wid/support/. Enter the document number 7008261 in the search field and click Search.

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.