Cyclic Workflows in Aria Automation Orchestrator

A workflow can loop back to an earlier item until a condition is met. Here’s a cyclic workflow built around a switch-case, a small part-of-the-day example, and tips on exits, tracking state and readable schemas.

In this article

Most vRO workflows run from top to bottom. But a workflow can also loop back to an earlier item and run it again until a condition is met. I call these cyclic workflows, and I believe they do have their use cases. In this post, I’ll show where I needed one, how it works, and what to watch out for.

Tested on: vRealize Orchestrator 8.x (original post, 2021) and VCF Operations Orchestrator 9.1.1 (re-tested, Nov 2026).

The problem

Suppose I have a workflow where I have to provision an entity, let’s say vCloud:Organization, for two types of customers (Managed Private Cloud and Virtual Private Cloud), which have different sets of inputs and parameter values. Now, repeat these steps for 2 sites.

Ideally, we can use the Foreach element, nested workflows or asynchronous workflows, and that’s totally OK. I use them a lot. But this time, I thought, why not keep everything in a single workflow and watch the whole execution flow complete?

How it works

The idea is simple. One central item, usually a switch-case or a decision, checks a condition. Each path does its work and then links back to that central item instead of moving on to the end. The workflow keeps cycling until the condition sends it to the end.

In my case, the switch-case checks whether the tenant is MPC or VPC, as well as the site. It first provisions vCloud:Organization in the local site, comes back to the switch-case, and then runs again in the remote site with a slightly different execution pattern. So I can execute these 4 scenarios in different orders and combinations without leaving my main workflow. Lovely.

Step by step

To keep it easy to follow, here’s a smaller version of the same idea. The input is a string with the part of the day: morning, afternoon, evening or night. Based on it, the workflow does the chores for that part and then cycles through the rest of the day.

Build the workflow

The switch-case is the central item. Each case does its chores and then links back to the switch-case.

Run it

Let’s say you want to find out what to do if it’s morning. Pass it as input and run the workflow.

Result

The workflow prints the tasks to do by the end of the day, coming back to the switch-case after each part:

2021-11-29 03:50:32.610 -05:00INFOwhat part of the day: morning
2021-11-29 03:50:32.629 -05:00INFODo Morning Chores:
2021-11-29 03:50:32.630 -05:00INFO
Take Bath
Make Breakfast
2021-11-29 03:50:32.656 -05:00INFODo Afternoon Chores:
Clean House
Make Lunch
2021-11-29 03:50:32.676 -05:00INFODo Evening Chores:
Go for Walk
Sip a tea
2021-11-29 03:50:32.690 -05:00INFODo Night Chores:
Make Dinner
Read Book and sleep

Believe me, it’s a very nice feeling when a big workflow runs, the execution jumps from one item to the next, and everything finishes perfectly with full logs. Ahh!

Things to watch out for

  • Always give the loop an exit. If no path ever reaches the end, the workflow keeps running until you cancel it.
  • Track where you are. Keep the current step or a counter in an attribute, so each pass knows what has already run.
  • Keep the canvas readable. Paths that loop back make the schema busier, so give every item a clear name.
  • A decision works too. When I re-tested this on VCF Operations Orchestrator 9.1.1, a decision element that loops back to a scriptable task until the day is over did the same job as the switch-case.
  • Orchestrator ships one too. The Start workflows in a series workflow in the /Library/Orchestrator/Workflows folder is cyclic in nature, with a decision activity as its center point.

Wrapping up

Cyclic workflows don’t replace Foreach or nested workflows, but when you want the whole flow in one place, they’re a neat option. If you like this idea or are already using it in your environment, feel free to share it with me. I would love to hear your feedback. See you in the next post.


Discover more from Cloud Blogger

Subscribe to get the latest posts sent to your email.

Enjoyed this post?

Was this helpful?

One response to “Cyclic Workflows in Aria Automation Orchestrator”

Leave a Reply