A project component is a single, unique and independent entity that can be reused in two ways:
- Referencing is a way to use the same component multiple times.
After a component is created, it can be referenced in multiple places throughout a project. For example, a project variable may be referenced within an activity and also within a script. Or an activity may be referenced within an operation (as an operation step) or within a script.
- Copying is a way to use an existing component's configuration to create a new, independent component.
After a component is created, you can duplicate it to create a copy. This action creates a new, unreferenced component that is not linked to the original component in any way. After you duplicate a component, any changes you make to the original component will not be reflected in the copy, and any changes you make to the copy will not affect the original component.
Referencing a Component
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 Salesforce 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: Transformations that have both a source and a target schema defined within the transformation can be referenced multiple times as operation steps. That is, if one or both schemas are inherited from adjacent activities, the transformation is unable to be referenced again.
- Scripts: All project component scripts can be referenced multiple times as operation steps.
Only components that are able to be referenced multiple times in an operation are able to be dragged to the canvas, with the exception of Salesforce and ServiceMax activities. These activities are able to be dragged into an operation only if they are currently unreferenced.
Creating a copy of a component is covered later on this page, under Copying.
Components Used in Support of an Operation
Most components that are not able to be used as steps in an operation are not able to be dragged to the canvas from the project pane, but 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 Components tab of the project pane.
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 a broken link icon to the left of 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 to the left of 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 to the left of the component name, inside a circle. Note that this count is not the number of times the component is referenced; if a component is referenced multiple times by another component, this counts as a single reference. 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:
Copying a Component
Creating a copy of an existing component is available for activities, scripts, project variables, email notifications, and schedules.
This action is available from the Components tab of the project pane. Hover over the component and click the actions menu icon to open the actions menu. From the menu, select Duplicate.
This creates a copy of the component as a new, unreferenced component. Upon creating the component copy, the cursor is positioned on the component name within the Components tab for you to rename the component:
To edit or perform other actions on the new component, use the component's action menu.
Remember that after you duplicate a component, any changes you make to the original component will not be reflected in the copy, and any changes you make to the copy will not affect the original component.
Last updated: Dec 10, 2019
- No labels