Thanks Matt. As far as I can recollect, the passes which add/remove of roles would trigger the provisioning/deprovisioning tasks. I am not sure if adding a delay would work. The reason being, the number of records would vary,. At times there may be 10 records and other times 10000 records. But chaining them will work. That's why I put them as a separate job and chained them
(manually execute the next job once the previous job is complete) to start one after another.
As per my understanding, when this job is executed, it will execute each of the passes within it, one by one sequentially. Since each pass triggers an event task (which deal with provisioning/deprovisioning), I suspect there might be some locking issues. ie, while the first pass is removing a role for user test1, the second pass is trying to add another role for user test1.
I need to spend more time on this. I will take your inputs and approach this issue. Will post once I find more things.
Thanks,
Murali.