I am running the “Reinstate” lifecycle in IIQ to re-enable accounts in a rehire case. The problem is that, to test the reinstate, I execute a rule that I force to always return true, but the process never finishes.
Your rule should return “true” when certain conditions are met; otherwise, it should return “false”.
For example, if a rehire occurs (user status = active and triggerFlag = Rehire), the rule should return true; otherwise, it should return false.
Understood. Should I set the new value for triggerFlag directly within the rule to prevent it from repeating? For example, if inactive = true, should I set inactive to false before returning true in the rule?
Because if the value isn’t set anywhere, the rule will always return true, and the loop will continue endlessly. Is this the right place to handle it?
The better way is to use any of identity attribute like ‘status’. Once your rehire rule triggers workflow, add a step in workflow to set this attribute ‘status’ to something else.
Eg: let’s assume, you have identity attribute ‘status’, in your workflow you can update ‘status’ to ‘Rehired’. Also, you need to modify if condition in your rule. Sample code is as below