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.

This page is organized into these sections:

  • Component Reuse Terminology
    This section defines the terminology used to discuss component reuse. A recognition of the difference between independent components and references to those components forms the basis needed for understanding the related UI terms:
    • Duplicating an operation to create a copy of the operation, either with operation step references or operation step copies
    • Referencing an existing operation
    • Cutting or copying operations to place them on your clipboard
    • Pasting as a new operation or as a reference depending on the context
  • Cutting and Copying Operations
    This section describes the various places from which you can cut and copy operations. Cutting an operation also deletes the operation or its reference from the project, depending on where it was cut from.
  • Creating a New Operation from an Existing Operation
    This section describes the various ways in which you can create a new operation from an existing operation. This is done by duplicating an existing operation or by cutting/copying and pasting to designated locations. You can create a copy of an operation either with step references (except for certain activity types) or with step copies. Copies of operations with Salesforce, Salesforce Service Cloud, and ServiceMax activities always create those activities as new activities rather than references, as reusing more than one of the same instance of these activity types is not allowed.
  • Creating a Component Reference
    This section describes the various ways in which you can reference operations. Operations can be referenced multiple times by any combination of other components. However, they can be referenced only a single time in a single workflow.

Known Issue

There is a known issue with component reuse:

  • Cutting, copying, and pasting using the Safari browser

    • Summary: Cutting, copying, and pasting with the Safari browser doesn't work with Safari 14.0 and earlier.

    • Workaround: Upgrade to Safari 14.1 or later.

Component Reuse Terminology

Project components as they appear in the Cloud Studio UI may be either independent components or component references:

  • Independent components are the discrete building blocks of a project and are contained in the project pane's Components tab. Independent components are the components in the project.
  • Component references refer back to the independent components. Component references in project workflows are contained in the design canvas and in the project pane's Workflows tab. Components may also be referenced by components that are not part of any workflows.

An operation as an independent component can be reused in a project in two ways:

  • Duplicating is using an existing operation's configuration to create a new, independent component in a project. After you duplicate an operation, any changes you make to the original independent component will not be reflected in the copy, and any changes you make to the copy will not affect the original independent component. When you duplicate an operation, a new operation appears in the project pane's Components tab and is an independent component in the project.

    You can duplicate an operation either with step references or with step copies:

    • An operation duplicated with step references has references to the original operation steps. (An exception: Any Salesforce, Salesforce Service Cloud, and ServiceMax activities are duplicated rather than referenced.)
    • An operation duplicated with step copies creates copies of each original operation step as new components.
  • Referencing is using the same operation more than once in a project and is the way you build project workflows. A component reference in a workflow is an operation, activity, transformation, script, or email notification that is visually represented on the design canvas and appears in the project pane's Workflows tab (except for email notifications). Component references can also be in other components, which may or may not be in project workflows. 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 project workflow. When you reference a component in or outside of project workflows, the reference count of the component in the project pane's Components tab is increased.

The word copy, as a noun, is used to describe a a new, independent component that has been created from an existing operation.

The words cutting and copying, as actions, both place a copy of an operation on your clipboard that is then used to create either an independent component or a component reference. Which of these two is created depends on the context when pasting:

  • Cutting places a copy of an operation on your clipboard and deletes either the original independent component or the component reference, depending on where the operation was cut from:
    • If an operation is cut from the project pane's Components tab, the original independent component is deleted.
    • If an operation is cut from the design canvas or the project pane's Workflows tab, as the component is a reference to an original independent component, only the reference is deleted and the original independent component is left unchanged.
  • Copying places a copy of an operation on your clipboard. The original independent component is left unchanged. Copying and then pasting an operation may result in either a new independent component or a component reference, depending on the context when pasting.
  • Pasting creates either an independent component or a component reference, depending on the context when pasting. For example:

Cutting and Copying Operations

You can access the Cut and Copy menu actions from an operation's actions menu in any of these places:

You can also use the standard keyboard shortcuts for cut (Control+X on Windows or Linux and Command+X on macOS) and copy (Control+C on Windows or Linux and Command+C on macOS).

Cutting and copying operations both place a copy of an operation on your clipboard.

Cutting an operation from the project (from the project pane's Components tab) deletes the original independent component from the project. As deletion is required, cutting an operation is possible only on unreferenced operations. The standard dialogs for deletion are displayed as documented in Operation Dependencies, Deletion, and Removal.

Cutting an operation from a project workflow (from the design canvas or the project pane's Workflows tab) deletes the component reference only. The original independent component is left unchanged.

Creating a New Operation from an Existing Operation

You can create a new operation as an independent component by using a combination of the CutCopy, and Paste menu actions (or their keyboard shortcuts) or by using the Duplicate menu action.

When using a combination of the CutCopy, and Paste menu actions (or their keyboard shortcuts), a new operation is created using the original operation's configuration with these exceptions:

  • Any assigned schedules are removed.
  • Any configured operations are removed.

When using the Duplicate menu action, a new operation is created using the same configuration as the original operation, including any assigned schedules and configured operation actions.

The default name of the new operation uses the name of the original independent component appended with - Copy. Subsequent copies are further appended with an incremented number in parentheses.

Pasting 

Once you have a copy of an operation on your clipboard, you can paste it in the same project using the current browser application or browser mode where you copied it from. Pasting operations between projects and browser modes is not supported.

Cut or copy an operation and then paste the operation in the project pane's Components tab or the design canvas:

  • Project Pane's Components Tab: Use the Paste Operation menu action from a component category's actions menu (see Category Actions Menu in Project Pane Components Tab). This action is enabled only when you have an operation on your clipboard.
  • Design Canvas: Select an operation's drop zone on the design canvas, and then use its Paste menu action (see Component Drop Zone Actions Menu in Design Canvas). If an operation component is pasted a single time in the design canvas, a new, independent component is created and a reference to that component is added to the project workflow.

On creating the new operation, your cursor is positioned on the operation name for renaming.

Duplicating

You can access the Duplicate menu action from an operation's actions menu in the project pane's Components tab (see Component Actions Menu in Project Pane Components Tab) or the design canvas.

The Duplicate menu action provides a choice between two duplication methods:

  • With Step References: Creates a new, independent operation only. The duplicate operation contains references to each of the original operation steps, with the exception of Salesforce, Salesforce Service Cloud, and ServiceMax activities, which are duplicated.
  • With Step Copies: Creates a new, independent operation and new, independent components referenced as operation steps. New components are created for each operation step and are referenced by the new operation.

If the operation is created from the design canvas, the new operation is also referenced in the project workflow. The new operation is displayed immediately below the original operation and your cursor is positioned on the operation name for renaming.

Creating a Component Reference

An operation can be referenced by other components or project 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

You can reference the same operation multiple times in multiple places throughout a project as described below.

Configuring an Operation Action

Select an operation when configuring an operation action 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.

Calling an Operation in a Script

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.

Dragging and Dropping

Drag an operation that is not currently in a workflow from the project pane's Components tab to an open workflow on the design canvas:

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.

Pasting

Once you have a copy of an operation on your clipboard, you can paste it in the same project using the current browser application or browser mode where you copied it from. Pasting operations between projects and browser modes is not supported.

Cut or copy an operation and then paste the operation in the design canvas by using the Paste menu action from a component drop zone's actions menu (see Component Drop Zone Actions Menu in Design Canvas). If an operation component is pasted a single time in the design canvas, a new, independent component is created and a reference to that component is added to the project workflow. Pasting the same operation additional times adds an additional reference to the newly created operation in the project workflow.

Viewing the Number of Component and Workflow References

Component and workflow references are counted and displayed within the project pane's Components tabThe display depends on how many components or workflows reference that component.

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.
  • No 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 next to the component name.

    For example, after duplicating 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:

  • A Single Reference

    If an operation is referenced by only one other component or workflow, it is displayed without any visual indicator next to the component name.

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

  • Multiple References

    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 next to 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.

  • No labels