Copying, duplicating, moving, and reverting library items
In IBM® Process
Designer, you can copy,
duplicate, and move library items in projects, depending on the permissions you have.
You can also revert library items in
projects.
About this task
When you want to copy or move artifacts in Process Designer, these operations can help you improve
productivity. For example, you can copy artifacts or duplicate them instead of creating them from
scratch. Similarly, you can move resources from process applications to toolkits for reuse.
Also, you can revert (roll back) artifacts to older
versions from previous snapshots if the current version has problems.
The following table describes the differences in these operations:
| Action | Description | Permissions |
|---|---|---|
| Copy | Creates a library item that is a copy of the original item. The newly created item is not associated with the original item from which it was copied. You can copy artifacts to the current version of the same process application or toolkit or to a different process application or toolkit. | You must have write access to the target process application or toolkit. |
| Duplicate | Creates a duplicate of the library item in the same process application or toolkit. | You must have write access to the target process application or toolkit. |
| Move | Relocates the library item to a different process application or toolkit. | You must have write access to the source and target process application or toolkit. |
Revert |
Replaces the current version of the library item with the selected snapshot version. | You must have write access to the target process application or toolkit. |
Before you proceed with any of these operations, consider how dependencies are affected:
- Copy
- When you copy library items, references to those items in the source process application or toolkit are unaffected because the original items remain and are still referenced. However, all the toolkit dependencies in the source process application or toolkit are also copied to the destination process application or toolkit even if the copied library items don't use them. For this reason, after you copy the needed library items, check and remove unneeded toolkits.
- Duplicate
- When you duplicate library items, the same references are created for the new item.
- Move
- When you choose one or more items to move, IBM Process Designer displays all the dependencies for the selected items. The list of dependencies includes library items that share the same XSD or WSDL file as the moving item, for example, two unrelated business objects, BO1 and BO2, that are defined in the same XSD file. If you choose to move BO1, Process Designer includes BO2 in the list of dependencies even though BO1 and BO2 do not depend on each other.
- Keep in mind, the destination you choose when relocating a library item might break existing
implementations and references in the source process application or toolkit. For example, consider
the case of an activity that is implemented as a nested process. If you move the nested process
without moving the process that contains the activity, the state of the activity's implementation
(the reference to the nested process) will depend on where you move the nested process. The
following table describes the state of the reference in different destinations:
Table 2. State of the reference to the nested process in different destinations If you move the nested process to State of the reference A new or existing toolkit on which a dependency did not exist The reference remains intact because Process Designer automatically creates a dependency on the toolkit. A toolkit on which the source process application is dependent The reference remains intact if the destination toolkit has not changed since the most recent snapshot was created. Process Designer automatically creates a snapshot of the toolkit and updates the existing toolkit dependency to the new snapshot. The reference breaks if the destination toolkit has changed since the most recent snapshot was created. You can fix the reference by updating the existing toolkit dependency to the new snapshot of the toolkit that Process Designer automatically creates.
A new or existing process application The reference breaks because process applications can't depend on each other. When you move library items to process applications, be sure to move all related items to avoid broken references. IBM BPM automatically resolves broken references when related items are not moved simultaneously. - By default, Process Designer moves all related items. If you analyze dependent items and choose to move only some of them, ensure that you understand all the relationships before you complete an operation. To ensure you moved or copied all items that are required for a particular implementation, check both the source and destination process application or toolkit for validation errors.
Revert- Before you revert a library item, check its references and where it's used. If the item is used in multiple processes or services, check with the other developers on your team before you make changes. If a single item is implemented across a process application, it is best to create a toolkit, add the item to the toolkit, and then create a dependency on the toolkit.
Procedure
From the Process Designer library,
select a category.
In the top-right corner of the
artifacts list, click
to toggle between single-selection and multi-selection modes to work with a single item or
multiple items. Depending on the mode you are in, select one or more items and the action from
the context menu.
- Dependent items are the artifacts that the selected library item uses and are moved with the library item. The list of dependent items to be moved includes items that are dependent because of the underlying implementation file. You cannot remove these items from the list of items to be moved.
- Artifacts with dependencies are the items that use the selected artifact. Note: Leaving artifacts with dependencies out of a move operation can cause errors in the source process application or toolkit because services, teams, or other items that are required for their implementation are being moved. When references are moved to a toolkit, you can update them and resolve the errors. However, when references are moved to a process application, the references are no longer valid because you can't have dependencies on process applications.