Design Studio enables you to propagate data model changes across a solution without sacrificing model integrity. Using the Refactoring menu, Design Studio enables you to rename and change the location of entities and data elements. Also, you can create similar data entities, modular and reusable data structures, and so forth. When you refactor entities and data elements, Design Studio updates all references to the entity or data element.
Note:
Close editors prior to refactoring. Editors that remain open during refactoring may display incorrect data or may display data marked with errors. Restart Design Studio to correct these issues.Note:
When you make design-time changes to existing cartridges and want to deploy those changes to a production environment, Oracle recommends that you increment the cartridge version number before re-deploying the cartridge.When refactoring entities and data elements, see the following topics:
You can rename entities and data elements and update all references to the new name.
Note:
See "Renaming Conceptual Model Entities and Realized Application Entities" for information about renaming conceptual model entities that you have previously realized as application entities.To rename entities and data elements:
Select an entity from a Design Studio view or a data element from an editor data tree or from a Design Studio view.
See "Design Studio Common Editor Tabs" for more information about editor data tree areas.
Right-click and select Refactoring, and then select Rename.
The Refactoring dialog box appears.
In the Name field, enter a new name for the data element.
Click Next.
Design Studio displays a list of all the changes to be performed.
Deselect any changes to be performed to exclude specific instances from the refactoring.
Note:
Deselecting elements that are referenced can cause model integrity violations.Click Finish.
Design Studio updates the data element name for all selected references.
Refactoring Entities and Data Elements
This topic describes how to change the name of a Design Studio conceptual model entity (for example, a customer facing service, a resource facing service, a resource, and so forth) after you have realized the entity and created application entities.
See Design Studio Concepts for more information about working with conceptual models.
You can rename conceptual model entities using the refactoring context menu options. However, if the conceptual model entity has been previously realized and is associated with one or multiple application entities, you must also update the existing realized application entity names before using the Design Studio Synchronize feature. If you do not, the Design Studio Synchronize feature creates new application entities with the new names, rather than updating the original application entities. This scenario results in multiple realized application entities for the same conceptual model entity, those created initially with original names, and those created after synchronization with the new names.
To rename a conceptual model entity and the realized application entities:
Right-click a conceptual model entity and select Rename.
The Rename Studio Model Entity dialog box appears.
Enter the new name for the entity, and then click Next.
Design Studio displays a list of all the changes to be performed.
Deselect any changes to be performed to exclude specific instances from the refactoring.
Click Finish.
Design Studio updates the entity name for all selected references.
From the Solution view, expand the conceptual model entity.
Right-click a realized application entity, select Refactoring, and then select Rename.
Rename all realized application entities to match the new conceptual model entity name.
For example, if you renamed a Customer Facing Service entity from Broadband to Broadband_new, change the name of the realized Service Specification entity to Broadband_new and make similar changes to the realized Service Configuration Specification (from example, change Broadband_Configuration_v1-0-0 to Broadband_new_Configuration_v1-0-0).
Note:
If you are renaming a conceptual model Resource entity that realizes an Inventory entity that does not support configuration specifications, you must also update the names of the realized Logical Device specification, the realized Logical Device Configuration specification, and the realized container specification. See Design Studio Concepts for more information about Design Studio for Inventory realizations.You can now use the Synchronize feature when you make subsequent configuration changes.
Working with Conceptual Models
Realizing Conceptual Model Entities into Application Entities
Synchronizing Conceptual Model Entities with Application Entities
You can move entities to a different folder in the same project or into a different project, and you can move data elements from one data schema to another. Design Studio updates all references with the new location.
To move data elements to a different schema:
Select an entity or data element from an editor data tree or from a Design Studio view.
See "Design Studio Common Editor Tabs" for more information about editor data tree areas.
Right-click and select Refactoring, and then do one of the following:
Select Move To to move data elements.
The Open Resource dialog box appears, displaying a list of all data schemas in the workspace.
Select Move to move entities.
The Move Studio Model Entity dialog box appears, displaying a list of all open projects in the workspace.
Select a data schema or a project folder from the list and click OK.
Design Studio displays all of the changes to be performed.
Deselect any changes to be performed to exclude specific instances from the refactoring.
Click Finish.
You can change the base type for all data elements that reference that type.
To change the base type for data elements:
From an editor data tree area, select a data element.
See "Design Studio Common Editor Tabs" for more information about editor data tree areas.
Right-click and select Refactoring, and then select Replace With.
The Refactoring dialog box appears, displaying a list of all base types in the workspace.
Select a base type from the list and click Next.
Deselect any changes to be performed to exclude specific instances from the refactoring.
Click Finish.
The data elements that derive from the base type are now updated.
You can copy a data element, and any children, to the root level of the same data schema or to a different data schema. The new data element created is defined as the base type for the original element. For example, if you make a structure reusable, references to the original location do not change. However, Design Studio changes the original child structure to a reusable base type structure in the Data Dictionary. You can now use this structure as a base type from which you can derive other structures.
To make modular, reusable structures:
From an editor data tree area, select a data element.
See "Design Studio Common Editor Tabs" for more information about editor data tree areas.
Right-click and select Refactoring, and then select Make Reusable.
The Open Source dialog box appears, displaying a list of all data schemas in the workspace.
Select a schema from the list and click OK.
Review all impacted entities.
Click Next.
Click Finish.
Design Studio moves the child structure to the root level of the selected entity.
You can create a data structure definition from an existing data element and add it to an existing model project.
To create a data structure definition from an existing data element:
From an editor data tree area, select a data element.
See "Design Studio Common Editor Tabs" for more information about editor data tree areas.
Right-click and select Refactoring, and then select Create Data Structure Definition.
The Data Structure Definition wizard appears.
Select the model project where you want to add the data structure definition.
(Optional) Click the Extends field Select button.
In the Matching items area, select a data structure definition that you want the new data structure definition to extend, or click New to create a new data structure definition that you want this data structure definition to extend.
In the Name field, enter a name for the data structure definition.
The name must be unique among data structure definition entities.
(Optional) Select a location for the data structure definition.
By default, Design Studio saves the data structure definition entity to the root level of the project folder. You can enter a folder name in the Folder field or select a location different from the default if you want to create additional subfolders. To select a different location:
Click the Folder field Browse button.
Navigate to the directory in which to save the entity.
Click OK.
Click Finish.
The new data structure definition entity appears under the model project in the Studio view.
About Data Structure Definitions
When you must manually resolve references that Design Studio cannot automatically resolve, you can reference new base types for multiple unresolved element references in entities, groups of entities, and projects.
For example, when working in the Studio Projects view, you can resolve all unresolved data elements in all Order entities that appear in a project's Order folder.
Note:
A data element is considered unresolved when Design Studio can no longer automatically resolve the reference to its base type. For example, if data element A in an Order entity references (as the base type) data element B in a model project data schema, and if element B is moved or deleted, data element A is considered unresolved.To reference new base types for unresolved data elements:
From the Solution view context menu or from the Studio Projects view context menu, select and right-click:
A Project entity (any Project entity other than an Environment Project entity)
An Order entity
A Mapping Rule entity
Any entity that can contribute to the Data Dictionary
Any folder that contains groups of entities that can contribute to the Data Dictionary
The context menu appears.
Do one of the following:
If you are working in the Solution view, select Refactoring and then select Resolve Node.
If you are working in the Studio Projects view, select Resolve Node.
The Resolve Studio Model Elements dialog box appears.
Note:
The Resolve Node menu option is not available when you select:An OSM project with any other type of project.
An OSM Order entity or a Mapping Rule entity with any other entity. For example, the menu option is not available if you select one Order entity and one Data Schema entity, or if you select one Mapping Rule entity and one Data Schema entity.
Any combination that includes an OSM Order entity and a Mapping Rule entity.
(Optional) In the Name field, enter the name or the partial name of an entity and click the Filter button.
Design Studio filters the table to include only those elements that meet the filter criteria.
Select an entity in the table.
In the Type field, click Select.
The Select Source Element to Resolve dialog box appears.
Select a new base element from the list.
If a base element does not appear in the list, you may need to deselect the Filter Project Dependencies option.
Click OK.
The new base type appears in the Type column.
(Optional) Select another entity in the table, click Select in the Type field and select a new base type.
Repeat these steps until you select base types for all unresolved elements in the table.
Click Finish.
Use the Design Studio Refactoring menu to propagate data model changes across a solution without sacrificing model integrity.
You can access the Refactoring menu from Design Studio editor data trees and from some Design Studio views. You can override the settings used to configure the behavior of Design Studio when refactoring data elements and entities. See "Refactoring Preferences Page" for more information.
Option | Use |
---|---|
Rename | Select to rename an entity or data element. An entity or data element can be renamed when:
Before renaming the entity or element, Design Studio displays a list of the impacted references, selected for rename by default. If you exclude a reference from the rename process, you must resolve that data element reference. After renaming, all selected references and extensions to the entity are updated. See "Renaming Entities and Data Elements" for more information. |
Remove from Workspace | Select to delete data elements from the workspace. You can remove elements from the workspace when:
Before removing the element, Design Studio displays a list of all changes to be performed. After removal, all references and extensions to the deleted element are updated. Note: Carefully consider the impact when removing from the workspace data elements that impact multiple systems. |
Create Data Structure Definition | Select to create a data structure definition from an existing data element. See "Creating Data Structure Definitions" for more information. |
Move To | Select to move a global data element to a different data schema.
You can move elements when:
Before moving the element, Design Studio displays a list of all changes to be performed. After moving, all references and extensions to the elements are updated. When moving structured elements, all child elements are moved to the target schema. See "Moving Entities and Data Elements to Different Schemas" for more information. |
Move | Select to move an entity to a different folder in the same project or to a different project.
This action is available from the Solution view, the Studio Projects view, the Structure view, and the Outline view. You can move an entity when:
|
Resolve | Select to reference a new base type for a data element that Design Studio cannot automatically resolve.
For example, consider that you have data element A that references data element B as the base type. If element B is moved or deleted, data element A is considered unresolved. You can resolve elements when:
|
Resolve Node | Select to reference new base types for multiple unresolved element references in entities, groups of entities, and projects.
For example, when working in the Studio Projects view, you can use the Resolve Node menu option to resolve all unresolved data elements in all Order entities that appear in a project's Order folder. The Resolve Node menu option is available from the Solution view context menu and from the Studio Projects view context menu when you select:
See "Referencing New Base Types for Unresolved Data Elements" for more information. |
Replace With | Select to change the base type for all data elements that reference the selected base type (this action is applicable only to data schema elements).
You can replace the base type for multiple data element references when:
For example, you can use this action when consolidating data models, as it enables you to replace proprietary types with common types. |
Copy Schema Element To | Select to copy a structured or simple data element to another data schema. When copying structured elements, all child elements are copied to the target schema.
Elements are copied to the target schema as global elements. You can copy child structures and child elements (independent of the parent element) to create new global elements. |
Make Reusable | Select to copy a data element (and any children, if applicable) to the root level of the same entity or to a different entity. The new data element created is defined as the base type for the original element (at the original location).
For example, consider that a structure employee includes child structure address. If you make address reusable, order template and atomic action references to the original location employee\address do not change. However, the original child structure address is now of type address and a reusable base type structure address is created in the Data Dictionary. You can make an element reusable when:
See "Making Data Elements Modular and Reusable" for more information. |
Use the Refactoring Preferences page to override the settings used configure the behavior of Design Studio when refactoring entities and data elements.
For each refactoring menu action, select one of the following values:
Field | Use |
---|---|
Prompt | Select to instruct Design Studio to alert you when refactoring data elements associated with entities and references. You can do one of the following:
|
Always | Select to instruct Design Studio to automatically perform refactoring actions against data elements even when the elements are associated with read-only entities. In this scenario, Design Studio automatically changes associated read-only entities to writable.
Design Studio prompts you before making read-only references writable. |
Never | Select to prevent users from refactoring data elements associated with references (defined as writable or read-only) or read-only entities. |