You are viewing limited content. For full access, please sign in.

Question

Question

Break a Repeat Loop

asked on August 4, 2021

I have a repeat loop in a workflow. I want that loop to to stop once the document is found in the repository. I want to check every hour for 8 hours to continuously check if document is in repository, what is the best way to achieve this?

0 0

Replies

replied on August 4, 2021

Your best best would probably be to use a token and change the value when the document is found.

  1. Create a token called "Document Found" with the Boolean tag and set the value to False (create this before the loop)
  2. Set the repeat loop to check if the token is True before running
  3. Check for your document inside the loop
  4. Add a Conditional Branch
    1. If your Find Entry/Search Activity finds results, set the token to True
    2. Else, run a delay

 

That should do what you want, but it depends how many documents you'll be looking for. If this process is just going to be looking for a large number of documents, it might make more sense to take a different approach to avoid having a lot of delay activities running.

2 0
replied on August 9, 2021

Thanks

0 0
replied on August 4, 2021

Have you tried using a wait condition? Workflow will be notified when the document is created in the repository, there's no need for periodic checks.

2 0
replied on August 9, 2021

Will check, thanks.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.