Hi Raj,
I'd love to contribute one example, and I'll also be following this thread to learn from everyone else's experiences.
Here is one from my recent Genesys Cloud experience.
Issue Description
I created a workflow triggered by the Speech and Text Analytics Topics Detected event. While looping through participants to find the first available queueId, the loop appeared to process only the first two items.
Symptoms
During testing, I received debugging notifications for indexes 0 and 1, even though the collection contained additional participants and the Next Loop action was present.
Impact
The workflow did not consistently reach the participant containing the required queueId, affecting the subsequent queue and topic-processing logic.
Investigation Performed
I temporarily added Send Notification actions inside the loop to identify which indexes and paths were being processed.
During the Community discussion, I learned that Send Notification has a limit of three successful invocations per workflow execution. However, I did not receive an ActionInvocationLimitExceeded error, and further testing showed that this was not the root cause of my issue.
Root Cause
The actual issue was how I had configured the loop logic and conditions. Some paths were not progressing through the collection as intended.
Solution Applied
I corrected the workflow so that it:
- Checks whether the current participant contains a queueId.
- Stores the first available queueId and exits the loop.
- Uses Next Loop when no queueId is present.
- Ensures each decision path reaches either Next Loop or Exit Loop.
- Sends one consolidated notification after the required processing.
Workaround
There was no separate workaround. The loop logic needed to be corrected.
Lessons Learned
Ensure every path inside a loop reaches either Next Loop or Exit Loop. Send Notification actions can be useful for testing, but the limit of three successful invocations per workflow execution must be considered.
I also learned that a topic filter on the trigger controls whether the workflow fires, but the payload can still contain the complete detected-topics collection. Therefore, the required topics may also need to be filtered within the workflow.
Previous discussion:
https://community.genesys.com/discussion/workflow-loop-only-iterates-first-2-items-01-not-continuing-despite-next-loop
------------------------------
Phaneendra
Technical Solutions Consultant
------------------------------