You are viewing limited content. For full access, please sign in.

Question

Question

Workflow Conditional Decision email on fail

asked on May 28, 2014

Workflow has a Conditional Decision that checks a field in the template of scanned documents.  If there is data in a particular field, the document is moved to a file folder.  If that field is null, the document is moved to a separate folder for user intervention.  We would like the Route Entry to Folder activity, for the null field documents, to generate an email to alert the users monitoring that folder.  The problem we are having is that if the email function is enabled for the null field folder it will send an email for every document processed by the workflow, including the successfully processed documents.  We would like emails for the unsuccessfully processed documents only.  This is our first workflow attempt, and other than this one issue it has been a great success.

 

0 0

Answer

APPROVED ANSWER
replied on May 29, 2014

Oh, I got it. It's your "Capture Document SSN" activity. If you look at the summary it is pointed at the Starting Entry, instead of the "For Each Entry->Current Entry". What this means is every time through the loop you are grabbing the same fields and doing the exact same query. So you will either end up with all successes or all failures depending on the starting entry.

0 0

Replies

replied on May 28, 2014

It sounds like you are on the right path, but need to include separation in your Conditional Decision branches, or perhaps need to check your conditions to ensure the documents with proper field data are being processed by the correct branch. I mocked up a general idea of what this should look like. If this does not help, please attach a picture of your workflow with its summaries so I can see the configuration.

 

 

 

0 0
replied on May 28, 2014 Show version history

Thanks Matt.  When comparing ours to the mock up you have they are nearly identical as best I can tell.  The entire workflow is shown below.  There is an incoming Teleforms folder.  Entries are moved from that folder to work Documents folder.  The SSN is captured from the document.  A query is run against a db with the SSN.  Any information returned from the query creates tokens.  The token values are applied to the document's template fields.  If there is data in the fields, the document is moved into its own SSN folder.  If there is not any data, the document is moved to a Review folder and an email sent.

 

If all 10 documents are successful, no emails are sent.  If 8 out of 10 documents are successful and 2 fail, 10 emails are sent even though there are only 2 in Review.

 

0 0
replied on May 28, 2014

Can you turn on the activity summaries?

0 0
replied on May 29, 2014

Sorry about that, updated with summaries.

0 0
replied on May 29, 2014

Looking at the workflow, I don't see anything in the summaries that has an email being sent out. If you look at mine you can see there is information about an email in the "Route to Problem Folder" activity, but I don't see anything like that in this workflow. Where are your emails coming from?

If you do not want to add the email as a part of your routing activity you can add a separate email activity to that branch, or even invoke a whole separate workflow if the field is empty.

0 0
replied on May 29, 2014 Show version history

You are correct, the email section was removed as it was not working correctly.  It has since been put back into the workflow.

 

0 0
APPROVED ANSWER
replied on May 29, 2014

Oh, I got it. It's your "Capture Document SSN" activity. If you look at the summary it is pointed at the Starting Entry, instead of the "For Each Entry->Current Entry". What this means is every time through the loop you are grabbing the same fields and doing the exact same query. So you will either end up with all successes or all failures depending on the starting entry.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.