I have not tried this, but what if you created a "middle-man" function that serves as a counter (returning simply n+1 ... results.n), and then use an exclusive gateway to either:
1.) End the loop (go to next item in workflow / end workflow) if n = loop_max
2.) Return to original function (before "middle-man" function) if n< loop_max
The condition applied to the gateway would be (for end condition arrow):
Script condition: continue
Advanced Scripting Options:
continue = True
if(workflow.properties.workflow_middle_man_results['n'] = 100):
continue= False
Flip True/False order for other condition.
------------------------------
Jared Fagel
Cyber Security Analyst Intern
Public Utility
------------------------------
Original Message:
Sent: Mon July 22, 2019 05:11 AM
From: Anbalagan Rajagopal
Subject: How to achieve loop in Resilient Workflow?
I want to achieve loop in Resilient workflow. For example, I want to call a function repeatedly for 'n' times, the value of 'n' will vary dynamically.
When I use workflow property to store the loop count, it doesn't allow me to overwrite workflow property value to maintain the loop counter variable for iteration.
So I just want to know, is there any way to achieve loop in workflow?
Regards,
Anbalagan R
------------------------------
Anbalagan Rajagopal
------------------------------