Loop Over Actions or Invoke Connections While a Condition is Satisfied with a While Action
The while action enables you to loop over actions or invoke connections as long as a specific condition is met. You define the condition for the while loop in the Expression Builder. The while action is available in both scheduled and application integrations.
Creating a While Action
Note:
Variables used in while action statements can be of several types, including number, string, and boolean types.-
Add a while action to an integration in either of the following ways:
- On the side of the canvas, click Actions
and drag the While action to the appropriate location.
- Click
at the location where you want to add the while action, then select While.
The Configure While panel opens. This includes a Sources tree of elements.
- On the side of the canvas, click Actions
-
Click Edit
under Configure While to enter a name and optional description for the while action.
-
Manually enter, select from the drop-down list, or drag an element from the Sources tree to the Value field. You can also add functions.
- Select an operator.
- Enter a value in the Value field.
-
Click Save.
For this example, while the counter is less than or equal to 10000, the integration loops over the condition. When the condition is not met, the looping ends.
-
Drag invoke connections or other actions for configuration to the + sign that is displayed inside the while action. These invoke connections and actions are processed as long as the condition set in the while action is met.
-
If you want to edit the name or expression, double-click the While icon or select Actions
, then Edit.
Note:
Deleting a while action has no impact on downstream processing of the integration because the while action does not have any output. Any changes in the upstream actions in the integration that impact the while condition result in the display of a warning icon on the while action.
Track the Status of a While Action During Runtime
During runtime, you can track the status of the while action in the Instances page through the tracking diagram and activity stream for an activated integration.
- In the navigation pane, click Observability, then Instances.
-
Click the business identifier value of the integration to track.
The integration flow (including any while actions) is displayed. Any while action failures are identified by red.
- Retrieve the Name and IDs from Account Records with the queryMore Operation in Using the Salesforce Adapter with Oracle Integration 3
- Retrieve Issue Details Using the Jira Query Language (JQL) in Using the Jira Adapter with Oracle Integration 3
- Use Pagination in an Integration in Using the Shopify Adapter with Oracle Integration 3