Hi Ajeet,
There is a great article on recursive workflows in Identity Security Cloud: Recursive Workflows in IdentityNow
In your case, if it’s looking at multiple identities, you can probably look at the asynchronous recursion. Try downloading the examples in this document and ply around with it for your use case.
Thanks,
Margo