Inactive users on approval activities (workflow)

rafael_merces2
Tera Guru

I am facing an odd (but maybe not unexpected behaviour): If you have the "approval - user" activity on your workflow and its approver is defined on "Users" or "Groups", without advanced condition, the user on the field "Users", for example, will receive and approval, even thought it is inactive. This will happen the user been and admin or not.

The bellow approval user definition will generate an approval for a inactive user, even if he is not admin.

find_real_file.png

 

However, if you use the advanced condition and ser answer.push( INACTIVE USER ), and open a request with a non admin user, probably because of the business rule filtering inactive users on the system, the approval is not even generated, and the approval is marked as approved. 

The approval set as the bellow image, for a non admin user, will not generate an approval to an inactive user.

find_real_file.png

 

Any of you faced this scenario? Do you have any workaround for this?

4 REPLIES 4

SanjivMeher
Mega Patron
Mega Patron

An alternate is to add the condition in notification 

 

Current.opened_by.active = True


Please mark this response as correct or helpful if it assisted you with your question.

Thanks Sanjiv, but my problem is with the user on the manager field. Also, I won't be able to check this information, as the user will not be visible by the end user due the "user query" before display business rule.

Sorry. In this type of scenario, we usually check if manager is active or not and if not then send approval to manager's manager or a person should be identified who cam approve if manager is not active.

 

So in workflow, we should check if current.opened_by.manager.active==true. If not, send approval to a person who can approve onbehalf of the manager


Please mark this response as correct or helpful if it assisted you with your question.

vinothkumar
Tera Guru

Even if you have written Before query business rule on approval table it will create an approval record for inactive user as well unless if anything is customized.

As a workaroound , You can write before insert business rule on approval table,if suppose the request is routed for the inactive user,change the state to approved and we are handling in our organization in this way only.