<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z0000A9mmuiCQAOkta Identity EngineWorkflowsAnswered2024-06-28T20:40:13.000Z2024-06-25T13:56:17.000Z2024-06-28T20:40:13.000Z

DarrinG.72466 (Customer) asked a question.

WORKFLOWS - Timed flow starts again before previous run completes

Hello all,

 

I have a workflow that sends an api query to grab certain events from the system log api every hour, then a helper flow that will take each event and put certain objects in a table that will be emails as a CSV by a separate workflow once every day. My goal is to get all the events for a 24 hour period. Worked just fine when it was just emails, but I'm running into an issue with making the CSV file.

 

The problem I'm facing is that it takes over an hour for the workflow to complete its run before it starts again, sending more data to the helper flow. Mixing up the csv file. So ParentFlow runs every hour, but runtime to completion is an 80 minutes. So at 80mins of processing an hour of data * 24 hours of data / 60 mins to make it even = takes 32 hours to generate 24 hours of data. Is there a way to make ParentFlow wait for a successful execution outside of changing the runtime to 80/90 minutes?


  • MaxKatz (Okta)

    Hi @DarrinG.72466 (Customer)​:

     

    You can try the following solution.

     

    Place a 'running' flag (true/false) in another Workflows table. Set 'running' to 'true' when the helper flow runs. Check the 'running' value before starting the main flow.

     

    Set the 'running' value to 'false' after the helper finishes processing.

     

     

    Expand Post
    Selected as Best
  • MaxKatz (Okta)

    Hi @DarrinG.72466 (Customer)​:

     

    You can try the following solution.

     

    Place a 'running' flag (true/false) in another Workflows table. Set 'running' to 'true' when the helper flow runs. Check the 'running' value before starting the main flow.

     

    Set the 'running' value to 'false' after the helper finishes processing.

     

     

    Expand Post
    Selected as Best
  • DarrinG.72466 (Customer)

    I had a similar idea, but I couldn't figure out which cards to use. My helper flow iterates through 1k objects, returned from my api call, so I thought I needed to place an if/else in the beginning of my parent flow but I would have to re-do all my cards. If I'm wrong about the placement I'd gladly try it out.

  • MaxKatz (Okta)

    You need to place the if/else at the beginning of the main flow (parent flow). Can you share the flow screenshots to understand better where you would place the if/else card?

      • MaxKatz (Okta)

        You could place the if-logic card as the first card in the parent flow (after the Scheduled Now card).

         

        Screenshot 2024-06-25 at 11.39.34 AMScreenshot 2024-06-25 at 11.39.41 AM

        Expand Post
      • TimL.58332 (Workflows)

        Essentially what Max is indicating is to have some sort of "check" that occurs to determine if you should perform another round of processing at that specific time. Probably the easiest way to implement something like this with the minimal amount of change to your existing design would be something like the following (This would be in your top level Parent flow which sounds like it is Scheduled)

         

        image 

        Have a table that just as the one column of isRunning T/F. Search it for its current value. If it isn't running the continue your processing otherwise stop processing.

         

        Then set the table to "it is running". Do your processing and post-processing then end the flow with setting it to "is not running". This would prevent overlap of executions on a schedule. At this point it wouldn't even matter if you set your schedule frequency down to lets say 5 minutes.. and it will just start again on the first interval when its not waiting for the previous one to complete.

        Expand Post
      • DarrinG.72466 (Customer)

        Thank You! For some reason the "Continue If" card never came to mind! I will implement this. Thanks so much! I was trying to make the If/Else work when I didn't have the right tool. I really appreciate the help!

This question is closed.
Loading
WORKFLOWS - Timed flow starts again before previous run completes