You can copy segments of workflows and worklets when you want to reuse a portion of workflow logic. A segment consists of one or more tasks, the links between the tasks, and any condition in the links. You can copy reusable and non-reusable objects in segments. You can copy segments into workflows and worklets within the same folder, within another folder, or within a folder in a different repository. You can also paste segments of workflows or worklets into an empty Workflow or Worklet Designer workspace.
You can copy individual non-reusable tasks by selecting the task and following the instructions for copying segments.
When you copy a segment, you might encounter the following copy conflicts:
Duplicate name
. You paste a segment into another workflow or worklet containing a task instance with the same name as the one you are copying. For example, if you copy a segment from Workflow_A containing s_Session1 into Workflow_B containing a session named s_Session1.
For reusable objects, you can resolve this conflict by replacing the task instance or renaming the task instance with a unique name. If you replace the task instance, the Copy Wizard overwrites the task instance in the target workspace. When you overwrite the segment, the conditions in the copied link overwrite the link conditions in the target workflow or worklet. If you copy and paste a task within the same workflow or worklet, you cannot overwrite the original task with the copied task. The Copy Wizard creates a copy of the task and assigns it a new name. To avoid overwriting an object instance in a target workflow or worklet, choose to create a copy of the instance instead of replace it. Each time the Copy Wizard locates a duplicate instance in the target workflow or worklet, it creates a new copy of the object you are pasting and renames it so that it does not overwrite any objects.
Cannot find mapping.
You paste a segment to another folder without the associated mappings in the target folder. You must select a new mapping. If the target folder does not contain a mapping, you must copy a mapping to the target folder before you can copy the segment.
Cannot find database connection
. You paste a segment to another folder, but the target folder does not contain the associated database connection. If you copy to a folder in a different repository, and a connection of the same name does not exist, select any connection of the same type in the target folder, copy the connection to the target repository, or skip the connection conflict.
Segment contains user-defined workflow variable.
If you paste a segment containing a user-defined workflow or worklet variable, expressions using the variable become invalid. User-defined workflow variables are valid in the workflow or worklet in which they were created.
To copy a segment from a workflow or worklet:
Open the workflow or worklet.
Select a segment by highlighting each task you want to copy. You can select multiple reusable or non-reusable objects. You can also select segments by dragging the pointer in a rectangle around objects in the workspace.
Copy the segment to the clipboard.
Open the workflow or worklet into which you want to paste the segment. You can also copy the object into the Workflow or Worklet Designer workspace.
Click Edit > Paste or press Ctrl+V.
The Copy Wizard opens and notifies you if it finds copy conflicts.