Skyone
Skyone
English
English
  • Home
  • Data
    • Getting Started
      • Create an account
      • Recover Password
      • Quick Platform Guide
      • How to test the platform for free
      • Workspace
        • Creating a new Workspace
        • Find a Workspace
        • Sending an invitation to a Workspace
        • Editing a Workspace
      • Organizations
        • Creating an Organization
        • Organization Overview
        • Organization Management
        • Organization Monitoring
      • Settings and Preferences
        • Profile
        • Notifications
        • Usage and Billing
        • Users and Permissions
    • Modules
      • Module management
        • Creating a Module
        • Importing a Module
          • IAC Files - Integration as Code
        • Editing a module
        • Module Options
      • Settings and Operations
        • Module settings
          • Connectivity: Database
          • Connectivity: Email
          • Connectivity: REST
          • Connectivity: SOAP
          • Connectivity: File
          • Connectivity: RFC
          • Connected Account Management
        • Operations
          • Importing operations into REST Modules
          • Operation Management
        • Flows Using This Module
    • Monitoring
    • API Gateway
    • Terminals & Agent
      • Agent
        • Versions supported by Agent
        • How to Update the Agent Version
        • How to back up Agent files
      • Terminals
    • Data
      • Data Stack
        • Process Control
        • Data Stack Upload
        • File Actions
        • File Jobs
        • Data Job Parameters
        • Data Store
        • Data Share Features
        • ODBC
        • How to use the Data Engine Proxy
    • Integrations
      • Integration Management
        • Create integration
        • Import Integration
        • Edit Integration
        • Integration Options
        • Flows of this integration
      • Flows
        • Flow management
          • Creating a flow
          • Flow options
          • Flow Canva: configuring and editing the flow
            • Flow Canva: overview
            • Exception Handler
              • Exception Handler - Configuration
              • Exception Handler - Cases
            • Multicontext Flows
              • Example: Multicontext with an API Gateway
              • Example: Multicontext with a Time Trigger
            • Flow Settings
        • Triggers of a flow
          • API Gateway Triggers: Adding and Setting
          • AS2 Triggers: Adding and Setting
          • Queue Triggers: Adding and Setting
          • Flow Triggers: Adding and Setting
          • Time Triggers: Adding and Setting
          • Webhook Triggers: Adding and Setting
        • Tool Modules
          • AS2 Module
          • CSV Module
          • Data Transform Module
          • Data Balancer Module
          • EDI Module
          • Flow Call Module
          • IF Module
          • JavaScript Module
          • Log Module
          • Loop Do While Module
          • Loop For Module
          • Return Module
          • XML Module
          • Other Tool Modules
        • Module Header
        • Connecting components of a flow
        • Editing triggers and modules
        • Data Operations
          • Object Handling
            • Practical example: Handling variables
          • SMOP (Small Operations)
          • Parameterization rules
    • How to
      • Insert JSON into databases
      • Flattening: Data transformation using JSONata
      • How to use Form Data
      • Understanding recursion in JSONata
      • REST Module Output Consolidation
      • Isolated in execution: concept and application in variables
      • URL Parameters in API Gateway
      • Use case: API Gateway trigger parameters
      • Use case: Exception Handler in financial transactions
      • Use case: using Groups to manage access to flows
      • How to create a download endpoint and integrate with Power BI
      • Is it possible to use two triggers in a single flow?
      • How to set up WhatsApp in Skyone Studio
    • FAQ
    • GIGS: The complete guide
    • Glossary
  • Support
    • How do I request support?
    • Case Severity Levels
    • SLAs
    • Help & Resources
Powered by GitBook
On this page
  • Definition
  • Configuring the Loop Do While module
  1. Data
  2. Integrations
  3. Flows
  4. Tool Modules

Loop Do While Module

PreviousLog ModuleNextLoop For Module

Last updated 6 months ago

Definition

The "Loop Do While" tool module, standard module for use in any flow, was created to process external data related to the number of records, about which we have no a priori information. It is useful because we need to have one or more interactions to consume all the data in a flow, a process that is also known as paged reading.

The "Loop Do While" module consists of two operations, DO and WHILE, which mark the beginning and end of a loop respectively.

The structure of this type of loop can be represented as follows:

var loop_count = -1;
do 
{
    loop_count ++;
	//bloco de código que será executado
}while(condition);

Note that the DO is initialized with a value of loop_count = -1, but the first instruction to be executed is its increment to "0". This maintains consistency with FOR, in which the first execution of the loop also has the value "0". In addition, as with FOR, the loop_count variable also contains the value of the number of executions minus one in the loop output.

To represent the loop_count , the DO operation of the Do While module initializes and maintains an equivalent parameter, which can be accessed by any module connected to the flow, called loopCount. This parameter stores the execution position of the flow, starting from the value "0" for the first execution, and incrementing it with each execution.

Configuring the Loop Do While module

The "Loop Do While" module appears in the Tools option when editing a flow. As soon as you click to add it, the modal opens for configuration:

Create your conditionals

In the Create your conditional area, there are the following fields and options:

  • Satisfy all: if you want all the configured conditions to be followed;

  • Satisfy any: when it doesn't matter if all the configured conditions are met;

  • Conditions: comparisons between two values (equal to, different from, greater than, less than, etc);

  • Add condition: click to add another condition;

  • Validate: click to validate the conditions

  • Result: tells you whether the condition entered is true or false (True/False).

Parameter

The loopCount parameter of the DO operation is always available to any modules inside the loop and also after the loop has been executed, appearing on the left-hand side of the configuration modal of each operation in the flow, as long as the operations are all connected by lines in the flow.

After the loop has finished, the loopCount parameter will contain the total number of executions minus 1 (since the variable starts at 0).

To finish configuring the module, click on "Save".

Example

The "Loop Do While" module requires another module to be connected to it. See the example:

.

Variable 1: type or drag a parameter from another flow component to enter a variable for comparison, or use a (on the icon);

Variable 2: type or drag a parameter from another flow component to enter another variable for comparison or use a (on the icon);

Definition
Configuring the Loop Do While module
Create your conditionals
Parameter
Example
Find out about the Module Header here
SMOP
SMOP
Configuration example