User leaves orgnaisation - best practise to handle in workflow


Badge +8

Hello All,

What would be the best practice or tricks (clever workarounds) to factor in workflow, when a user leaves the organisation and the task is yet to get assigned to him. The workflow would error out if the user does not exists and there is no simple way of restating the workflow only from the point it has error-ed out.

Any good suggestions that you have been using in your project..

Couple of ways ..

1) we manually ensure that the user exist before the workflow reaches that stage (where it is supposed to assign the task to the user)

2) Try to build the state mechanism in such a way that it exits, but there is not error handling in the Assign Flexi Task option, so this is not a very neat solution.

Could someone throw ideas on how they would generally handle any user leaving the organisation and the workflow can handle it elegantly and not error out?

Regards,

Shrini


10 replies

Badge +16

Can you utilise this to check the approver is a valid SharePoint user?

you could then do something under the "no" branch and assign a different user?

Userlevel 4
Badge +12

Hi,

what I assume best practices is to never work with single people in a workflow but with SharePoint- or AD-Groups. When a person leaves the company you only need to remove or replace them from/in the group. This way you do not have to update any workflows or add specific logic in advance in your workflow.

Kind regards,

Enrico

Badge +16

absolutely agree with this sentiment also - I would never assign a user to the flexi task in the configuration; always a group or a list item property that can be changed on each run of the workflow easily.

Badge +8

Yes this could be checked but again in the No loop can I start go into the same state? or would have to create a new state to handle this (In case of State machine)

Further I believe (haven't tested it) will this work if the user to check if a multi people variable? If one of the user is not valid I believe it would fail?

Regards,

Shrini

Badge +8

Hi Enrico,

Thanks for your reply - using SharePoint group wont always be the case as there are scenarios where task needs to get generated for the user selected in the SharePoint list. 

Regards,

Shrini

Badge +8

Hi Cassy,

Thanks for your earlier reply as well, much appreciated. I am using people saved in the list property to assign the task, but the scenario is when the list is saved and when the time comes for the workflow to assign the task, in between if the user leaves then the workflow will error out. I have made my list editable but it would be a proactive check by the admin to update the list item if any users leave.

So to summarize is the best practice only to check for the valid user before the assign task happens? or is there any other ways as well? I am assuming "Set Condition" check for multiple users as well?i.e. if one of them is not a valid user then it will go to the No branch

Regards,

Badge +16

Not an easy one to test and I can't be sure it would evaluate to false in the case of one of the multiple users not being a valid user. I'll see what I can test tomorrow. 

Badge +8

Hi Cassa,

I have tested this and it works, with multiple users if one of the user is not a valid user it does go to the No branch. Is this the only way to handle such a scenario or do we have any other design approaches?  The Reason I am asking is that the workflow gets big if for every task that needs to be assigned to any user we have to do this validation and handle this in the No branch (In the No branch the workflow could be moved to a different state and again jump back to the same state (where the task was supposed to be assigned) once the user name was corrected.

Regards,
Shrini

Badge +16

the only other way I have done it before is to query the user profile and catch an error so much the same process, if not more long winded.

Is there an option that approvers of task 1 can choose approvers of task 2?  that way they are selected in the form and should only ever be current users?

Badge +8

Hi Cassy,

Thanks very much for all your thoughts, much appreciated. Most of the users that need to be selected will be taken via the list item property. 

I would probably use the same approach using set condition and pushing it to a different state if "No" occurs. I was only curious if there were other ways people are used to catch an exception like this.

One of the other things which could be of interest is Restarting the workflow when an error occurs which I believe is put up as feature request. Please vote if you also find this useful, may be Nintex can add such a feature and it will handle such unhandled exceptions.

Restart Workflow From The Point of Failure – Customer Feedback for Nintex 

Regards,

Shrini

Reply