Iterative Comparison in Workflow

Hello everyone,

I’m currently developing a workflow that involves comparing account values for an identity with multiple accounts from a specific source.
I’ve incorporated a loop operator to iterate over each account associated with the identity.

However, I’m facing a challenge in figuring out how to efficiently store the information from one iteration so that it can be compared with the account information in the subsequent iteration.
I made multiple attempts and am out of idea.

I would greatly appreciate any insights or guidance you can offer on this matter.

Thanks.

Hello Augjm,
You can use “Define variable” operator to store the information from the iteration.
Could you please share more information about your workflow, if that doesn’t work?

1 Like

Hi Augjm,

You can also use various compare operators along with define variable operator to compare multiple accounts and save required details during each iteration.

Hi Anagha and Mehul,

Thank you both for your insights.

Unfortunately, it isn’t as simple as using Define Variable blocks to store information from iteration N so that it can be used in iteration N+1.
From my testing, the main issues are as follows:

  • Usually, when conducting iterative comparisons, the first loop must be distinguished from the following ones, as no comparison is needed, and the only necessity is to store the information. I’ve yet to find a coherent way to do so.
    The only way I could envision is to define a variable right before the loop, appending text at the start of each iteration, then performing some comparison to determine whether it’s the first loop.
    This comparison leads to the following issue.

  • The first iteration is necessarily in another branch than the following iterations since the operations are different. However, it doesn’t seem possible to call a block defined in another branch.
    The same issue persists for later-defined blocks that cannot be called earlier. However, in iterative comparison, it is customary to do something akin to the following, which doesn’t seem possible in workflow:

    • Evaluate data from the previous iteration (N-1) against the current iteration’s data (N).
    • Update the stored data from iteration N-1 with the information from the current iteration N.
    • Proceed with the ongoing comparison using the updated data.

Thank you kindly,

There doesn’t seem to be a way to do iterative comparison in workflows.
The solution seems to create an identity attribute associated with an IAR, then do a comparison block based on this attribute in the workflow