Variable read activity¶
Introduction¶
A Variable Read activity reads data from a Variable endpoint and is intended to be used as a source to provide data to an operation. After configuring a Variable connection, you can configure as many Variable activities as you like for each Variable connection.
For more information on using variables in scripts, transformations, and connection/activity configuration screens, see Variables.
Create a variable activity¶
An instance of an activity is created from a connection using an activity type.
To create an instance of an activity, drag the activity type to the design canvas or copy the activity type and paste it on the design canvas. For details, see Creating an activity instance in Component reuse.
An existing activity can be edited from these locations:
- The design canvas (see Component actions menu in Design canvas).
- The project pane's Components tab (see Component actions menu in Project pane Components tab).
Configure a variable read activity¶
Follow these steps to configure a Variable Read activity:
Step 1: Enter a name and provide a response schema¶
-
Name: Enter a name to use to identify the Variable Read activity. The name must be unique for each Variable Read activity and must not contain forward slashes (
/
) or colons (:
). -
Provide Response Schema: The response schema defines the structure of data that is used by the Variable Read activity. Whether a response schema is required depends on if the activity is used as the source of a transformation (see Schema usage). For instructions on completing this section of activity configuration, refer to Schemas defined in an activity.
-
Save & Exit: If enabled, click to save the configuration for this step and close the activity configuration.
-
Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.
-
Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Step 2: Review the data schemas¶
-
Data Schema: If provided during activity configuration, the response data schema is displayed. If the operation uses a transformation, the data schemas are displayed again later during the transformation mapping process, where you can map to target fields using source objects, scripts, variables, custom values, and more. You can also define schemas directly in a transformation.
-
Add Plugin(s): Plugins are Jitterbit- or user-provided applications that extend Harmony's native capabilities. To apply a plugin to the activity, click to expand this section and select the checkbox next to the plugin to be used. For additional instructions on using plugins, including details on setting any required variables used by the plugin, see Plugins added to an activity.
-
Back: Click to temporarily store the configuration for this step and return to the previous step.
-
Finished: Click to save the configuration for all steps and close the activity configuration.
-
Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.
Next steps¶
After configuring a Variable Read activity, complete the configuration of the operation by adding and configuring other activities, transformations, or scripts as operation steps. You can also configure an operation's operation settings, which include the ability to chain operations together that are in the same or different workflows.
Once a Variable activity has been created, menu actions for that activity are accessible from the project pane in either the Workflows or the Components tabs, and from the design canvas. See Activity actions menu for details.
Variable Read activities can be used as a source with these operation patterns:
- Archive pattern
- Transformation pattern
- Two-target archive pattern (as the first source only)
- Two-target HTTP archive pattern (as the first source only)
- Two-transformation pattern (as the first source only)
- Salesforce bulk target pattern
Other patterns are not valid using Variable Read activities. See the validation patterns on the Operation validity page.
A typical use case is to use a Variable Read activity in the Transformation pattern. In this example, the Variable Read activity (Read Request) provides data to the operation, which is then received by the transformation (Variable to HTTP). The HTTP POST activity (POST Response) is used as a target, receiving data within the operation:
To use the activity with scripting functions, write the data to a temporary location and then use that temporary location in the scripting function.
When ready, deploy and run the operation and validate behavior by checking the operation logs.