I have a process model that includes a script task with the following output:
rule!SC_getImportPregressoPc(id: pv!index)
The problem I'm facing is that I'm incrementing the index by 1 in each iteration to move to the next item, but the IDs in my dataset are not sequential. For example, I have IDs like 5, 6, 7, but the next ID might be 500 due to filtering applied by the rule, causing my process to exit early when it reaches a gap in the ID sequence.
How can I configure the process to iterate over only the IDs present in my filtered list, rather than assuming a simple +1 progression?
Any guidance would be appreciated!
Discussion posts and replies are publicly visible
What is SC_getImportPregressoPc() doing?
If it's querying, why wouldn't the "pv!index" you're feeding in just iterate the StartIndex of the PagingInfo? This would completely bypass the issue of gaps in an ID sequence, and even different sortings (if you want to prioritize items by implementing custom sorts, etc).