Skip to end of metadata
Go to start of metadata

Introduction

This page describes how to reuse project components that are used as operation steps or in support of operations.

Details about referencing a transformation that uses a schema inherited from an activity are provided as a supplement to this page in Transformation Reuse.

Reusing operations themselves is covered in Operation Reuse.

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 independent component can be reused in a project in two ways:

  • Duplicating is using an existing component's configuration to create a new, independent component in a project. After you duplicate a component, 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 a component, a new component appears in the project pane's Components tab and is an independent component in the project.
  • Referencing is using the same component 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, a project variable may be referenced in the configuration of an activity used as an operation step in a project workflow, and may also be referenced in a script that itself is unreferenced by any project workflows. 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 component.

The words copying and cutting, as actions, both place a copy of a component 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:

  • Copying places a copy of a component or activity type on your clipboard. The original independent component is left unchanged. Copying and then pasting a component may result in either a new independent component or a component reference, depending on the context when pasting.
  • Cutting places a copy of a component on your clipboard and deletes either the original independent component or the component reference, depending on where the component was cut from:
    • If a component is cut from the project pane's Components tab, the original independent component is deleted.
    • If a component 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.
  • Pasting creates either an independent component or a component reference, depending on the context when pasting. For example:

Copying and Cutting Components

You can access the Copy and Cut menu actions from a component or activity type's actions menu in any of these places:

The keyboard shortcuts Control+C (Windows or Linux) and Command+C (macOS) can also be used to copy a selected component or activity type. Keyboard shortcuts for cutting a selected component are not supported.

Copying and cutting components both place a copy of a component on your clipboard. Activity types can also be copied from the design component palette; the copy on the clipboard will be used to create a new component in the project (an activity instance).

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

Cutting a component reference 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 Component from an Existing Component

Creating a new, independent component from an existing, independent component is available for schemas, activities, scripts, transformations, project variables, email notifications, and schedules.

You can create a new component from these existing components by using the Duplicate menu action or by using a combination of the Cut or Copy and Paste menu actions or their keyboard shortcuts.

The default name of the new component uses the name of the original independent component appended with - Copy. Subsequent copies are further appended with an incremented number in parentheses. As project variable names cannot have spaces, hyphens, or parentheses, the default name of a duplicated project variable uses no parentheses and uses an underscore instead of the spaces and hyphen.

Duplicating

You can access the Duplicate menu action for a component in the project from a component's actions menu in the project pane's Components tab (see Component Actions Menu in Project Pane Components Tab).

On clicking Duplicate, a new, unreferenced, independent component is created using the same configuration as the original independent component.

Pasting

Once you have a copy of a component 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 components between projects and browser modes is not supported.

Copy or cut a component, and then use the Paste Component Type menu action from a component category's actions menu in the project pane's Components tab (see Category Actions Menu in Project Pane Components Tab). This action is available in the Files, Endpoints, Scripts, Transformations, Project Variables, Emails, and Schedules categories, and is enabled only when you have a component of the corresponding type on your clipboard.

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

Creating an Activity Instance

You can create an activity instance as a new, independent component by dragging and dropping or by using a combination of the Copy and Paste menu actions or their keyboard shortcuts.

Dragging and Dropping

Drag an activity type from the design component palette's Connectivity tab to an operation on the design canvas:

Pasting

When you copy an activity type, the copy is used to create a new, independent component in the project (an activity instance).

Once you have copied the activity type, you can paste it in the same project using the current browser application or browser mode where you copied it from. Pasting activity types between projects and browser modes is not supported.

Copy an activity type and then paste it — creating an activity instance as an independent component — in one of these ways:

  • Use the Paste Activity menu action accessible from a component category's actions menu in the project pane's Components tab (see Category Actions Menu in Project Pane Components Tab) to create an activity instance in the project.
  • Select a component drop zone on the design canvas, and then use its Paste menu action (see Component Drop Zone Actions Menu in Design Canvas) to create an activity instance in the project and add a reference to that activity instance in the project workflow.
  • Select a component drop zone on the design canvas, and then use the keyboard shortcut Control+V (Windows or Linux) or Command+V (macOS) to create an activity instance in the project and add a reference to that activity instance in the project workflow.

Creating a Component Reference

Certain types of components can be used as operation steps, including activities, scripts, and transformations. Other types of components can be used in support of operations. Most of these component types can be referenced multiple times, as covered below.

Components Used as Operation Steps

Certain types of activities, transformations, and scripts can be referenced multiple times as steps in an operation:

  • Activities: Most activities can be referenced multiple times as operation steps. Exceptions include SalesforceSalesforce Service Cloud, and ServiceMax activities, which cannot be referenced by more than one component. Instead, you can make a copy of a Salesforce or ServiceMax activity to use elsewhere.
  • Transformations: All transformations can be referenced multiple times as operation steps. When referencing a transformation using a schema inherited from an activity, the order in which an operation's steps are configured controls how schemas are propagated across transformation references, as described in Transformation Reuse.
  • Scripts: All project component scripts can be referenced multiple times as operation steps.

Components that are able to be referenced multiple times in an operation are able to be dragged or pasted, with the exception of Salesforce, Salesforce Service Cloud, and ServiceMax activities. These activities are able to be dragged or pasted only if they are unreferenced.

You can create a reference to one of these types of components as an operation step by dragging and dropping or by using a combination of the Cut or Copy and Paste menu actions or their keyboard shortcuts.

Dragging and Dropping

Drag the component from the project pane's Components tab to an operation on the design canvas:

Pasting

Once you have a copy of a component 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 components between projects and browser modes is not supported.

Copy or cut a component, select a component drop zone on the design canvas, and then paste the component in one of these ways: 

  • Use the Paste menu action accessible from the drop zone action's menu on the design canvas (see Component Drop Zone Actions Menu in Design Canvas).
  • Use the keyboard shortcut Control+V (Windows or Linux) or Command+V (macOS).

Components Used in Support of an Operation

Most components that are not able to be used as steps in an operation may be able to reused or referenced in other ways. Component reuse in support of operations is covered in the documentation for each component:

  • Endpoints: Endpoints in Jitterbit Script, for using certain types of existing connections and activities as arguments with Jitterbit functions
  • Notifications: Email Notifications, for linking an existing email message in multiple operation chains
  • Operations: Operations in Jitterbit Script, for using existing operations as arguments with Jitterbit functions
  • Schedules: Operation Schedules, for applying existing schedules to multiple operations
  • Schemas: Sample File Schema, for selecting a saved schema during schema definition
  • Scripts: Scripts in Jitterbit Script, for using existing scripts as arguments with Jitterbit functions
  • Variables: Variables, for referencing variables that can be read any number of times
  • Plugins: Plugins, for applying plugins on activities in an operation or running a plugin within a script

Viewing the Number of Component References

Component references are counted and displayed within the project pane's Components tab.

If a component is not referenced by any other components in the current project, it is known as an orphaned component. Orphaned components are displayed with an unreferenced (broken link) icon  next to the component name.

For example, these two new scripts are not used within any operations or referenced elsewhere within the project:

If a component is referenced by only one other component, it is displayed in the project pane without any visual indicator next to the component name.

For example, these scripts are each used within a single operation:

If a component is referenced by multiple components, the number of components it is referenced by is displayed next to the component name, inside a circle.

In this example, the first script is referenced both within an operation as well as by another script, and the second script is referenced by one additional script:

This count is not necessarily the number of times the component is referenced; if a component is referenced multiple times by another component, this counts as a single reference. For example:

  • A project variable that is referenced several times within a script counts as having been referenced only a single time.
  • A project variable that is referenced several times within an activity configuration counts as having been referenced only a single time.
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 labels