Skip to main content
February 6, 2024
Question

Loop in process model

  • February 6, 2024
  • 2 replies
  • 0 views

Need a loop for multiple texts. To test the loop just made a dummy loop like below

Start node:
Process variables : array(Text, multiple, {"a","b", "c"}), iteration (Number, Integer),  len(Number Integer)

Set len :
Set output: expression: = length(array), stored to: pv!len 

Properties: Delete after execution

XOR:
=pv!iteration>pv!len true End NOde
Else: Text Doc From Template

Text Doc From Template
save a document

named: pv!iteraion

description: pv!iteration & array

Properties: Delete after execution

Increase Iteration:
Set output: expression: = pv!iteration+1, stored to: pv!iteraion 
Properties: Delete after execution

But I can see the it stuck at XOR after 1st iteration. Why?
Let me know if you want more info.

2 replies

stefanhelzle0001
February 6, 2024

An XOR with multiple inputs used in a loop will stop at the second iteration. That is by design. Add an empty script task before the XOR and merge your flows in that one.

Some tips on looping: https://docs.appian.com/suite/help/23.4/looping.html

abhayd3663
February 6, 2024

Create a script task before XOR and redirect increase iteration to that script task. Alternatively you may use existing 'set len' also.