Vadim Tabakman

When using the Assign a Flexi Task action, one of the "behavior" options is "All must agree on a specific outcome".

A good scenario here, is if you have a Project Proposal, and everyone who is assigned the task must approve the proposal.  If someone doesn't, the it's a no-go.

Behavior

In the above example, I only have 2 possible responses (Approve and Reject).

The thing to note, is that if an approver selects "Reject", the workflow will not go down the Reject path.  Instead, it will go down a path called "Other".  This is a hidden branch, but in order for your workflow work correctly, you should make it visible.

To do this, in the configuration of the Assign a Flexi Task action, scroll down to the bottom, expand the "Advanced options" section, and check the box to show the "Other" branch.

Show other branch

The issue is, that when someone does not pick the specific outcome, there really no easy way to figure out what outcome was selected and by whom.  I've found one way of doing it.  As I've said in the past, this is by no means the only way to get this information.  It's just the way I found was easiest for me.

Getting the latest outcome from the Approver Comments

When you have an Insert Reference button in one of the Nintex Workflow actions, you'll see that one of the properties you can get from that Insert Reference popup window is called the "Approver Comments". This is the latest approver comments for a task created in that instance of the workflow.

These comments start of with the user who created them, followed by the outcome selected by that user in round brackets.

To extract the outcome selected, I found the following Regular Expression gave me what I needed:

(?<=\().*(?=\))

Regular Expression

What this is the following:

(?<=\)) - this is a Positive Lookbehind.  It will match an open round bracket but not include it in the results.

.* - matches all characters

(?=\)) - this is a Positive Lookahead.  It will match a closed round bracket but not include it in the results.

This Regular Expression will find me the text that is surrounded by open and closed brackets.

Once the Regular Expression action has run, you can use a Collection Operaiton action to perform a get.  The first entry in the collection is what we are after, and store the result in a Text variable.  We now have out selected outcome.


Who selected that outcome?

Now that we have the outcome selected by our non-conformist Smile, we need to find who this person is.  This comes in handy if you want to build in logic into your workflow to notify someone that the task was not approved, or you want to send that user a different task.

In this case, we can use similar logic (Regular Expression -> Collection Operation).

This time, the Regular Expression is :

.*(?= \()


Conclusion

Now that I have this information, for my own testing, I use a Log in the History List action to log the Approver and the Outcome they selected.

Log Approver and Outcome

You can see that I logged the information I was hoping for.  If you need to, you could run other Regular Expressions on the Approver Comments to retrieve other information (eg. Date/Time it happened and the comment itself).

Downloads

Download workflow

Posted by Vadim Tabakman Tuesday, February 28, 2012 8:39:00 AM Categories: Collection Operation Flexi Task Nintex Nintex Workflow Regular Expression Set a Condition
Copyright Vadim Tabakman
Rate this Content 13 Votes

Comments

Monday, March 5, 2012 9:30:06 AM
Mark Jordan

re: Nintex Workflow - All must agree on a specific outcome

I downloaded and tried your workflow. While this is a nice idea toward resolving the issue, it does not work when you enable the "create individual tasks for all group members" option in the flexiTask. The concept of "all must agree on a specific outcome" should assign individual tasks to each of the assignees of the task. Only then will each vote count.

The problem with enabling the "create individual tasks..." option is... when the LastApproveComments is read in the "other" branch, there are multiple outcomes within parentheses, and the one that is an alternate to the specified desired outcome may not be listed first. For instance, here is an excerpt of mine where you'll see that the user that selected an alternate to "approve" is shown toward the end of the LastApproverComments value:

=== Excerpt ===

Doug MacNEIL (Not Required) 3/5/2012 10:38 AM -

Mark J. Jordan (Not Required) 3/5/2012 10:38 AM -

Mark Jordan (markj001 test acct) (Not Required) 3/5/2012 10:38 AM -

Mark Jordan (markj002 test acct) (More Information Needed) 3/5/2012 10:38 AM -

=== End of Excerpt ===

 

Thursday, December 27, 2012 12:29:11 PM

re: Nintex Workflow - All must agree on a specific outcome

Vadim you came through for me again.

My client has a situation where they have multiple approvers, and in order to approve the item everyone needs to approve. However, there is a RMI (Request for More Information) outcome I added, which only requires one approver's response to take this route.

After spinning my wheels for an hour, I reached out to Nintex, which came back to me with "It is not possible". Not satisfied with this, I turned to your blog and what-do-ya-know, the answer is sitting right here.

This works wonders for my purposes. I cannot thank you enough.

As wonderful as this is, it still has it's caveats. I now have 2 outcome branches, Reject and RMI, which are required, but can never be executed. If one of them is selected, it's auto routed to the Other branch, which I then handle the route from there.

I responded to Nintex Support asking for this logic as a feature request for the future. Because the Assign flexi task action is a major selling point for Nintex, I think this addition could be very useful.

Thanks my friend,
-Josh Henninger

Thursday, December 27, 2012 11:04:48 PM

re: Nintex Workflow - All must agree on a specific outcome

Hi Josh,

I'm glad this post helped you.  It's good to see this being helpful to users of NW.

Let me know if there's something you'd like me to write about. I'm always happy to look into things.

p.s. definitely a good feature request.

cheers,

Vadm

Thursday, October 24, 2013 9:38:36 PM
Jen

re: Nintex Workflow - All must agree on a specific outcome

Hi Vadim,

What is the best approach to handle approve/reject/request change workflow when you have multiple approvers (1st level - manager; 2nd level - consists of 3 Dept heads) who needed to be notified at the same time (parallel) and may have different responses? The condition is set to terminate workflow only when all agree. I am new to Nintex.

Wednesday, November 27, 2013 5:25:50 AM
George

re: Nintex Workflow - All must agree on a specific outcome

Hi Vadim,

I have used flexi-task for one of my nintex requirements.

My scenario is that there are 170 users and i want all the 170 users to select either approve/reject.

Using the different behaviours available with flexi-task,I'm not able to achieve.could you help me achieve this?

Using "First response applies",only one user is able to approve/reject

Using "Majority decides",if the first 86 users approve it,then workflow gets completed while the remaining users are not able to approve/reject

Using "Majority must choose a specific outcome",behaves the same way as earlier behaviour.

Using "All must agree" and "All must agree on a specific outcome",the users are able to select only approve/reject :(

I even tried to remove the branching and use only one outcome Eg.Approve.But in the selection page,"Approve" is not displayed(if we have 2 or more outcomes only the outcomes gets displayed)

Can you help me?

Sunday, April 13, 2014 7:25:27 PM

re: Nintex Workflow - All must agree on a specific outcome

Nice one, thanks! This helped me out!

Wednesday, October 28, 2015 11:27:14 AM
Diorella
Gravatar

re: Nintex Workflow - All must agree on a specific outcome

Is there any way to extract the comments of the approver, any regular expression?

Wednesday, October 28, 2015 3:52:12 PM

re: Nintex Workflow - All must agree on a specific outcome

Take a look at this : http://blog.sprider.org/2012/03/14/how-to-strip-approver-comment-from-nintex-workflow/

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?
Register





 

Statistics

  • Entries (272)
  • Comments (1768)

Categories