Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

One way to Create A Conditional Loop In AEM WorkFlow | AEM Community Blog Seeding




One way to Create A Conditional Loop In AEM WorkFlow by Heena Shirke


1. Create a workflow variable - Example: loopcount

The value of the workflow variable is maintained throughout the workflow instance

2. Increment the variable using Set Variable Step - Example: loopcount=loopcount+1

Changes to variable values affect only the instance of the process in which the change occurs. For example, when a workflow is initiated and variable data changes, the changes affect only that instance of the workflow. The changes do not affect other instances of the workflow that were initiated previously or are initiated subsequently.

3. Add rule a definition in Goto Step to define the exit criteria - Example: loopcount<10

The Goto Step allows you to specify the next step in the workflow model to execute, dependent on the result of a routing expression.

You can use variables to define the routing expression using the expression editor. In this example, the Goto step specifies the Tester Process Step(i.e. Step before Or Split) as the next step if the value for the loocount variable is less than 10 thus creating a loop. If the loopcount increases to 11 the workflow will exit the loop and go to normal flow.

Read Full Blog

One way to Create A Conditional Loop In AEM WorkFlow


Please use this thread to ask the related questions.

0 Replies