Condition based on manager action


Badge +3

workflow want to write a condition based on manager action.  My status assignment are FA, SUB  or PA.  The outcome values are reject, approve or abstain.  if ALL managers select approve or abstain then status = FA, if 1 manager outcome=reject then status=sub, if one or more managers outcome = approve or abstain but not all manager  then status = PA.  How and where do I put that logic in my workflow?


16 replies

Userlevel 3
Badge +9

‌, welcome to the community.  I'm having a hard time following your description of the scenario.  Could you provide a little bit more detail around your process.  Are these status assignments values in a list, or is this a modified Flexi-task?  Could you provide a screenshot of your workflow?  Thanks. 

Badge +3

Thanks Brandan M for your response.  My status field is part of a list.  The list are as follows:  Submit, Fully Approve, Partially Approve and Not Approve.  Based on this workflow.  I have 3 outcomes Reject, Approve or Abstain.  If a approver(manager) rejects my proposal than the status will be not approved,  If the approver(manager) approves or Abstains then the status will be Approved.  What I need to test for is partially approve.  If 3 managers get this request and only 1 or more but not all has approved it.  Then  status is partially approved.  Once all managers approve then I want the status to read fully approved.

workflow image

Userlevel 3
Badge +9

I killed Brandan.  Only BrEndan remains. happy.png  Ok, If I'm understanding your correctly, you have a list that has a choice field called "Status" that has the following options (Submit, Fully Approve, Partially Approve, Not Approve).  Something kicks off your approval workflow that sends a task to multiple managers to approve.  (I'm assuming you have the multiple managers entered within the Flexi Task) Based on the responses of those managers, you want to update your status field on the list.  

It sounds like from your statement,

What I need to test for is partially approve.  If 3 managers get this request and only 1 or more but not all has approved it.  Then  status is partially approved.  Once all managers approve then I want the status to read fully approved.

that you are intending to update the status of your item as approvals are responded to.  Is that correct?  If so, that would be a bit complicated.  If all your managers are assigned in the same Flex Task, the workflow will not continue until all responses are received.  You would have to have another process that would query your task list on some sort of interval, evaluate the approval tasks status, and then update the status field on your item accordingly.  

Another option would be to have a sequential approval process.  So you would have a Flexi Task assigned to the first manager.  After they respond, you could update the status of your item based on that response, and then go to the next Flexi Task.  If someone responses "Reject", then you could update the status as "Not Approve" and you wouldn't need the further tasks.   Below is an example.  See if that meets your needs. 

 

 201739_pastedImage_5.png

Badge +3

Sorry Brendan Murphy.  Thanks for prompt response.  FYI--This is my first workflow project.   According to the workflow.  I need to create 3 Assign Flexi task in my work flow?  I don't want to send an update to my users I just want to change the status field to partially approve.  I plan to create a dashboard in SharePoint that will display the managers names, and whether and the status of my users request.  The updates are notices sent back to my users.  I am only interested in the status field showing the correct status based on management approval.

Userlevel 3
Badge +9

I just gave an example of how it would work. It depends on when you are wanting to update your status on the item.  Are you trying to do it while the approval process is in progress, or after all the approval tasks have been responded to?

Badge +3

I want to update the status while the approval process is in progress and after all approval task has been responded to. 

When my users make a request my default status is set to Submitted.

If all managers approve or abstain then status=Fully Approve

else if at least on manager approves then status=Partially Approve

If 1 manager rejects then status=not approved.

Thank you again.

Userlevel 3
Badge +9

If that is the case, then that is why I suggested the sequential Flexi Task option.  If you use only one Flexi Task and put all your approvers in that action, the workflow doesn't advance until an outcome is reached for that action.  Which given your criteria, you'd need to wait until everyone responds.  The only way in that scenario to accomplish what you want would be to have a 2nd workflow that queries your task list periodically, looks at the status of all the approval tasks, then updates your item status accordingly.  In the sequential task option, you would need as many tasks as you have approvers.  After each person responds, you could then update your item status, then move on to assigning the next task.  

Badge +3

Thank you again.  I plan to test this workflow with a few colleagues this week.  I studied your workflow very carefully and it logicially made sense.  My understaninding is I would send the workflow to one manager 1st.  That manager would approve, abstain or reject the proposal.  If he rejects the proposal the work flow stop.  If he approves or abstains then the approval process will drop to the next FlexiTask option.  In the next option, I was going to put the rest of the managers in that option.  But, if I understand you correctly you are saying that I need to create a flexi-task option for each manager's approval.  Correct?

Userlevel 3
Badge +9

Yes, if you are wanting to set the status of your item as each manager responds, you'd need a separate Flexi Task for each person, and after they respond evaluate the response and update the item status accordingly.  In the example I assumed that if one person rejected it, there would be no need to send the other approvals, which is why I had the "End Workflow" action on the Reject path.  But definitely run some tests and play with some different scenarios so you can get and understanding of how it works.  You can always assign the Flexi Tasks to yourself for test purposes just to get an understanding of how responses are handled and what you can do with them. 

Badge +3

Thanks Brendan for your help.  I understand for each approver I should do a separate Flex Task.  Can I do it parellel as oppose to sequential?  I clicked on the workflow progress link and it give me a visualization of what I need.  I want all of the approvers to get the request at the same time. 

Userlevel 3
Badge +9

You can use a parallel action, however be aware that the workflow will not continue until all paths have been completed.  So let's say the first person responds "rejected".  You'd need to still wait for all the other people to respond.  And you'd still need some logic to evaluate how to update the item status value.  So if you're requirement is that each person has to get the task at the same time, then you should stick with putting each person in a single flexi-task.  Then build a workflow on your task list that fires each time a task is updated.  That workflow would do the evaluation of the task responses to determine what status to update your item with.

Badge +3

If I wanted to write an if statement.  Which workflow Action should I use.  My condition is as follows

  if all MGR either approve or abstain) status = Fully Approve

  if at least one MGR (rej) then status = submitted

  else if at least one MGR (Approve or abstain) status=partially approved

Note:  I did change the reject outcome from not approve to submitted. 

Where would this logic go in my workflow?  and which workflow action or actions do I use? 

Userlevel 3
Badge +9

The Set Condition action functions like an If statement.  If you're going with the suggestion to use the single Flexi Task, then you'd need a separate workflow on the task list to do the evaluation of the tasks and update the item status.  

Since you are new to Nintex, it would be a good idea to get familiar with the various actions that exist and what each one does.  The Nintex Help file will have information on each action, what it does, and how to use it.  You should have a help file installed in your environment, so when you are building the workflow if you click the "Help" button it will open the help file.  If you don't then you can access help files here. Documentation.  

Badge +3

I am still confused about the condition and how it is used.    If the condition reads if "current item" field equal value.   What is the current item?  After doing a little research it looks like I should be settting something to the value of "current item".

I created an active directory of 6 approvers.  I have been trying to figure out how to get the values of the approvers in my active directory to a field to use in the process.  I see that there is a field called manager.  It looks like I should be able to click a lookup on the active directory on the 6 approvers that I created for this task.

So what I'm saying is I have an active directory but I did not assign values to the active directory to a field.  And because of this that is why I am still confused.

Am I correct in my thinking? 

Userlevel 3
Badge +9

The current item is the item your workflow is running on.  Since this is a workflow running on a list, it will be running on a specific item in that list.  That would be the current item.  If you look in the Where section, you'll see the first drop down will show you a list of all the columns for that list.  So you can set a condition based on any column in the list, and when the workflow runs, it would evaluate the value for that column for the current item the workflow would be running on. 

What do you mean when you say you created an active directory?  Do you mean you created a group in active directory and then added the 6 people to that group?  If you did that, you need to make sure the group is security enabled, otherwise it won't show up in SharePoint.  Assuming that it is, you could then just add the group to the Assignee field on the Flexi Task.  You would then want to click the box for "Create individual task for all group members."

Badge +3

I really appreciate your expertise.  I am learning a lot.  Your are correct I created a group in the active directory and added 6 people in the group.  Thank you again. 

Reply