Integration

Get Involved. Join the Conversation.

Topic

    Rishabh
    Overriding Scheduled Parameter in Scheduled IntegrationAnswered
    Topic posted July 17, 2019 by RishabhBronze Medal: 1,250+ Points, tagged Integration 
    65 Views, 9 Comments
    Title:
    Overriding Scheduled Parameter in Scheduled Integration
    Summary:
    How to pass different values of Scheduled Parameter in schedules
    Content:

    Hi All,

    I have a use-case where I have one scheduled parameter named as 'region'

    I want to create schedules for the integration for two regions 'EMEA' and 'APAC'

    I have enabled the override scheduled parameter feature but not sure how I can pass those.

    Any leads will be helpful.

     

    Regards,

    Rishabh

    Version:
    19.3.1

    Best Comment

    Hemanth Lakkaraju

    See this if it helps.

    Comment

     

    • Hemanth Lakkaraju

      See this if it helps.

      • Rishabh

        Hi Hemanth,

        I used same article for my use-case. But the thing I am stuck at : I need to pass two values of region and schedule it to run daily for both the regions. In the article, they say that I need to pass the region while scheduling but I don't want to schedule everyday.

         

        Regards,

        RT

        • Hemanth Lakkaraju

          but I don't want to schedule everyday.

          Do you mean for every region or for the scheduled flow itself? How will you trigger the flow?

          • Rishabh

            Yes. I want to schedule the same integration to run daily for both the regions. Schedule only needs to trigger the flow.

            • Hemanth Lakkaraju

              Here is what my suggestion is!

              NOTE: Ideally, not recommended and you should be cautious enough while designing the flow such that the schedule orchestration will not run in an infinite loop.

              Create a scheduled Orchestration with REGION as parameter and default it to say APAC. Inside the scheduled orchestration, after the business logic is completed, create a SWITCH ACTION with a branch checking for default value (APAC in this case). Inside the branch using this REST API, call the scheduled orchestration *from within itself* by updating parameter to EMEA. In the otherwise branch, you can STOP the integration. This way, same schedule orchestration can run with different parameters in a sequential manner.

    • Arya Sanyal

      Hi Rishabh,

      There is yet another solution for your problem. This does not require usage of schedule parameters.
      Here's how:

      1. Create a scheduled integration. No schedule parameters required.
      2. Declare a variable numAreas (using assign action) and set it's value to the number of areas you want to process. So, for APAC and EMEA, numAreas = 2.
      3. Declare another variable index = 0.
      4. Add a while loop with condition (index < numAreas)
      5. Add switch-case inside the loop, and add branches:
            a. IF (index <= 0) - then add EMEA business logic. Increment index by 1 using another assign action.
            b. IF (index = 1) - then add APAC business logic. Increment index by 1 using another assign action.
            c. Otherwise - STOP

      Then you can schedule this integration to run at 5:00pm daily.

      Thanks,
      Arya

       

      • Mani

        good idea. may be use lookup instead of hardcoding the values to eliminate flow change if you have to change the parameters down the line. you can consider comma separated list that can be separated in the integration to control the loop

      • Rishabh

        Thanks Arya and Mani for the suggestion. I will try to implement the same.