Refactoring Variables in Elements
Refactoring a variable in an element involves renaming a variable and propagating that change to all the elements that use the source element. Refactoring ensures that changes are applied to all the applicable references of elements.
Before refactoring any variable in a element, make sure to review the considerations and limitations presented in
Guidelines for Refactoring Variables.
Important:
You cannot perform a rollback of the changes after you refactor a variable. Software AG recommends that you back up your packages before refactoring a variable name.
To refactor variables in elements
1. In Package Navigator view, double-click the element to open it.
Ensure that you have write access to the element.
2. Right-click the variable you want to refactor.
3. Select Refactor > Rename.
4. In the Refactor variable wizard, type the new name in the text box and click Next.
All the occurrences of the variable are displayed in the Changes to be performed list. Designer provides a preview all the element types selected for refactoring except webMethods messaging triggers.
5. Select the check boxes next to the variable occurrences that you want to refactor. Designer selects all the variable occurrences by default.
Note:
If you clear the selection of a variable occurrence from the Changes to be performed list, that occurrence is unlinked from the variable in the source element. Then you must manually edit the particular variable occurrence. Note that the link to the variable in the source element will be lost forever and all future update to the variable occurrence need to be done manually.
The IS Asset Compare view displays the changes between the original asset and the refactored asset. This view is only available for IS document types and flow services.
6. Click Finish. The Refactor Log tab displays the refactor status of each occurrence.
For variable occurrences that are not refactored, the refactor log displays the reason along with the status. You must manually update these occurrences. However, elements that are not refactored by
Designer are unlinked from the source element. The unlinking cannot be undone which is why
Software AG recommends that you back up your packages before refactoring a variable name.
For an element that has more than one input variable with the same name, refactoring any one of those variables results in
Designer displaying an extra variable. This is an issue with the way that
Designer displays variables with the same name after refactoring. The issue does
not impact the results of the refactoring operation.