This is a detailed topic in our support portal in the Using Hopp series and assumes that you have some prior knowledge or experience using Hopp. |
Sometimes, we make mistakes or simply change our minds. For instance, in Studio, you may create a Validation Rule only to change your mind later and wish it were a Mapping Rule instead.
You may want to change the way that you have created a Business Object hierarchy. Maybe you have created a child Business Object somewhere that you would rather move to be a child somewhere else—even to be its own root Business Object.
While Studio does not allow you to move, it does allow you to copy and then - if you indeed intended to move - afterwards delete the original. Why? Well, when you consider committing these changes back into the Repository, this is simply a safer way to go about it, as the copy and the delete are two separate operations that can safely be committed individually. A move operation would potentially cause changes in the object being moved, the old parent and the new parent. And if these changes are not committed together or - even worse - undone individually, the Studio mapping risks breaking to the point where Studio would refuse to open it.
You can copy in 2 different ways
- Drag and drop in the Studio tree view
- Copy and Paste from Clipboard
Drag/drop is fast and convenient in many cases, but Copy/Paste may be more suitable if the copy must be placed far from the original in the tree view.
Copying a Business Object
A Business Object can be copied as a child to another Business Object, provided that the destination Business Object is not checked out to another user.
A note: It is only in the Target Map that you can copy Business Objects around in this manner, you cannot do this in the Source Map. After all, the Target Map is in charge of defining the Business Object hierarchy, the Source Map just has to follow along and populate the Interface Fields of the Business Objects as they are defined by the Target Map. In the Source Map, you can Duplicate Business Objects if you need to extract source data in multiple ways for a given Business Object
Drag and Drop
In the video below, the Business Object LogicalAddress - a child under the Business Object Customer - is copied by dragging it onto the Business Object Individual.
The copy is placed as a child under Individual and contains everything from the original LogicalAddress, including all the descendant hierarchy of Business Objects and Target Objects.
Note that the copy operation included automatically checking out the receiving Business Object Individual. This was, of course, only possible because no one else already had the Individual checked out.
Copy and Paste
Instead of using drag and drop, it is also possible to do the exact same thing using the Copy and Paste options in the context menu (or the Ctrl-C/Ctrl-V shortcut keys).
In the video above, the LogicalAddress is copied out as a new root Business Object.
Consequences in Mapping
Depending on where the copy is placed, some of the mapping inside the copy may be broken and will have to be fixed. Fear not, the Studio validation will clearly mark the places that must be fixed.
For instance, in the video above, the child LogicalAddress is being copied out to be its own root Business Object. This means that the new copy is no longer a child of the Business Object Customer, and any references in the new copy to elements in Customer are, of course, not valid and must be fixed.
Copying a Target Object
You can also copy a Target Object using Drag and Drop or Copy and Paste. Again, you can only copy the Target Object onto a Business Object that is not checked out by someone else. If necessary, the destination Business Object will be automatically checked out.
Target Objects can also be copied using Copy and Paste, and the consequences for the mapping are similar to copying a Business Object.
Copying Rules
You can also use drag and drop to copy rules and implicitly change the type of the copy. For instance, if you have created a Validation Rule but later actually want it to be a Mapping Rule instead, you can just copy it - by drag/drop or copy/paste.
Manual rule implementation
If you are copying a manual rule, you may have to go to Visual Studio and edit/move the manual implementation of the rule too
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article