Skip to end of metadata
Go to start of metadata

Introduction

This page describes how to reuse operations in a project. Reusing other types of project components is covered in Component Reuse.

Operations can be reused in projects two ways:

  • Referencing is a way to use the same component more than once.

    After an operation is created, it can be referenced in multiple places throughout a project. For example, an operation may be referenced in an operation action configured on another operation, and also referenced in a script function, and also referenced in a single workflow. Any changes made to the operation affect all places where it is referenced.

  • Copying is a way to use an existing component's configuration to create a new, independent component.

    After an operation is created, you can duplicate it to create a copy. This action creates a new, independent operation that is not linked to the original operation in any way. After you duplicate an operation, any changes you make to the original operation will not be reflected in the copy, and any changes you make to the copy will not affect the original operation. 

Referencing an Operation

An operation can be referenced by other components or workflows throughout the project.

An operation can be referenced multiple times by any combination of other components. However, it can be referenced only a single time in a single workflow. An operation cannot be referenced multiple times in the same workflow, nor can it be referenced in multiple workflows.

Referencing an Operation

There are several ways to reference the same operation multiple times, in multiple places throughout a project:

  • Select an operation when configuring operation actions on another operation. The same operation can be the subject of actions that are configured to run on success, failure, or SOAP fault of any number of other operations in the same project.
  • Use an operation with a Jitterbit Script General Function that takes an operation reference path as a parameter, such as RunOperation() or GetLastOperationRunStartTime(). An operation can be called by functions any number of times.
  • Drag an operation that is not currently in a workflow from the Components tab of the project pane and drop it onto the design canvas within a workflow. Though operations cannot be referenced by more than one workflow, a single operation can be both in a single workflow and be referenced by one or multiple operation actions and/or functions (regardless of any associations with operations that may or may not be in the same or different workflows). An operation can appear only once on the design canvas of a project.

Viewing the Number of Component and Workflow References

If an operation is not referenced by any other components or workflows in the current project, it is known as an orphaned operation. Orphaned components, including operations, are displayed in the project pane with an unreferenced (broken link) icon  to the left of the component name.

For example, after copying an operation from the project pane, it does not appear in a workflow on the design canvas, nor is it referenced by any other components:

If an operation is referenced by only one other component or workflow, it is displayed in the project pane without any visual indicator to the left of the component name.

For example, these operations are each contained in a workflow:

If an operation is referenced by a component and a workflow, or it is referenced by multiple components, the number of components and/or workflows it is referenced by is displayed to the left of the component name, inside a circle.

In this example, Example Operation and Second Example Operation are each in a workflow and each has an operation action configured to call Example Operation - Copy, which is not in a workflow, resulting in two reference counts:

The count is not necessarily the number of times the operation is referenced; if an operation is referenced multiple times by another component, this may count as a single or multiple references, depending on how the operation was referenced. Configured operation actions each count as a reference, but multiple references by non-operation components are not aggregated in the total count.

For example:

  • A script that references an operation twice by its reference path in a script — perhaps by using both the GetLastOperationRunStartTime() and RunOperation() functions — counts the operation reference only a single time.
  • An operation configured to run an operation both on success and on failure of the operation counts the operation reference two times.

Though there is no visual indication in the project pane that operation actions are configured, you can determine how the operations are linked by viewing dependencies or initiating the operation deletion dialog, as described in Operation Dependencies, Deletion, and Removal.

For example, when you view the dependencies of Example Operation and Second Example Operation, you will see that Example Operation - Copy is dependent on the first two operations. When you attempt to delete Example Operation - Copy, you will see Example Operation and Second Example Operation listed as components preventing Example Operation - Copy from being able to be deleted.

NOTE: The number of references is based off of the project as it currently exists in the Cloud Studio project designer and doesn't take into account whether components have been deployed to Harmony.

Copying Operations

Creating a copy of an operation is available from the project pane in both the Components and Workflows tabs, and from the design canvas.

When you create a copy of an operation, the components that are referenced as operation steps within the operation are also copied. As an operation's settings are part of its configuration, any configured actions that trigger on success or failure of the operation are also included in the copied operation.

After you duplicate an operation, any changes you make to the original operation will not be reflected in the copy, and any changes you make to the copy will not affect the original operation.

Project Pane Components Tab

From the Components tab of the project pane, hover over the operation and click the actions menu icon  to open the actions menu. From the menu, select Duplicate.

This creates a copy of the operation as a new, unreferenced component, and its steps as new components that are referenced by the copied operation. The new operation name takes the name of the copied operation and is appended with " - Copy" to indicate how it was created.

On creating the operation copy, the cursor is positioned on the operation name within the Components tab for you to rename the operation:

The copied operation is displayed with an unreferenced icon  to the left of the component name, as there are no references to it.

Project Pane Workflows Tab

From the Workflows tab of the project pane, hover over the operation and click the actions menu icon  to open the actions menu. From the menu, select Duplicate.

This creates a copy of the operation as a new, unreferenced component, and its steps as new components that are referenced by the copied operation. The new operation name takes the name of the copied operation and is appended with " - Copy" to indicate how it was created.

There is no visible indication in the Workflows tab that an operation has been copied; instead, the copied operation and its steps are accessible from the Components tab of the project pane, where you can rename the operation manually.

Design Canvas

From the design canvas, in the top right of an operation, click the actions menu icon  to open the actions menu. From the menu, select Duplicate.

This creates a copy of the operation as a new component, referenced by the workflow where it was created, and creates copies of its steps as new components, referenced by the copied operation. The new operation name takes the name of the copied operation and is appended with " - Copy" to indicate how it was created.

The copied operation and its steps are displayed in the workflow on the design canvas immediately after the operation that was copied, with the cursor positioned on the operation name for renaming:

On This Page

Last updated:  Nov 16, 2020

  • No labels