Service Studio 6.0 Help
Replace Element Usages
Complementing Find Element Usages, Replace Element Usages supports eSpaces refactoring by replacing all the usages found for an element with another element. In this way you can, for example, replace at any time, an entity usage by an entity reference usage if you choose to maintain it in a different eSpace.
How to use the Replace Element Usages:
The Replace Element Usages window Show picture lists all the eSpace elements of the same type of the element that is being replaced. Be aware that although actions can be classified differently (see the Action Flow Toolbox), as long as they can be invoked in an execute action, they are "interchangeable" in this replacement.
When you press OK in this window, Service Studio checks some conditions for the replacement. However, these are only informative and do not stop you from doing the replace operation:
For Entities and Structures
Suppose you're replacing the Entity Intervinient by the Entity Client:
The attributes of Intervinient should exist on Client (Client can have, though, other attributes that do not exist in Intervinient).
The attributes that exist both in Intervinient and in Client should have the same data type.
For Actions and Web Blocks
Suppose you're replacing Action ValidateIntervinient by the Action ValidateClient:
The parameters of ValidateIntervinient should also be parameters of ValidateClient.
Mandatory parameters of ValidateClient should exist on ValidateIntervinient.
The parameters that exist both in ValidateIntervinient and ValidateClient must have the same data type.
If these conditions are satisfied, the element usages are replaced by the new element with no further delay.
If one of these conditions is not satisfied, a contextual warning, like the following, is displayed:
You can decide whether or not to proceed with the replacement. You should avoid replacing elements whose attributes or parameters are not the same or that have different data types, in order to avoid verification errors.
After a Replace all Element usages operation is complete, the information of the replaces usages is displayed (at the bottom left corner of the tab).
The original element continues to exist in your eSpace, only its former usages were replaced by the new element usages.
Find Element Usages