cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

User leaves orgnaisation - best practise to handle in workflow

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

Labels: (1)
0 Kudos
Reply
10 Replies
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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?

Accept as Solution Reply
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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,

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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. 

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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

Accept as Solution Reply
Workflow Hero

Re: User leaves orgnaisation - best practise to handle in workflow

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?

Accept as Solution Reply