Forum Discussion

bdre's avatar
bdre
Occasional Contributor
6 years ago
Solved

Why doesn't this file datasource loop terminate?

This file datasource uses a text file that has 10 lines in it, each line is a phone number like 9495550000 The data loop as it is doesn't terminate.  What could be going wrong?   The screen shot s...
  • richie's avatar
    6 years ago

    HI,

     

    I've never seen a loop used that way - what's the purpose behind it?

     

    When you specify a datasource loop - you have to specify the target step and the datasource step.  Currently your target step is the same as your datasource step - typically the Target Step value is some sort of Request (REST/SOAP etc.) that uses the data from the datasource in some way -  so you point the loop's target step back to the request that uses the data - not the datasource step itself.

     

    If you stuck a REST request in between the datasource and the loop steps and specified the target step in the loop config as the REST request - this should execute as many times as the number of lines of data in your datasource file.

     

    Hope this helps,

     

    Cheers,

     

    richie