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

Question

Question

validate specific document types exist in folder before routing document

asked on December 29, 2014

each time a new document is create we need to run a test to see if all the document types exist in the starting entries folder.  (document types is a template field)   example   document is created we need to validate that a site drawing was completed, deposit was made, photos taken, and inspection was completed before an email notification is routed to the installation department.     what is the best way to accomplish?

 

0 0

Replies

replied on December 29, 2014

 The best solution will depend on how your repository is set up. Below is one solution assuming that each set has it's own folder (or that only one set of documents will be in the folder at a time), that the type a document is is determined by its template, and that the document types will vary.

Set the starting rule to run the workflow on the containing folder, retrieve the document types with a Retrieve Field Values activity, and then iterate through the document types with a For Each Value activity. Inside put a Conditional Sequence to check if the folder contents contains an entry with Template Name equals the current value. If it does not, end the workflow. It will run again when a new document is created, and eventually when all necessary documents are there, it will continue. (See below)

This is a fairly generic solution that you could probably adjust to use in a variety of cases. However there are other solutions you could use, again depending on your repository, that will would use starting rules or wait conditions to wait for all the documents.

Good luck!

-Kevin 

ValidateWF.png
ValidateWF.png (8.51 KB)
2 0
replied on June 16, 2015

Sure, looking back on this 6 months later I was really confused what I meant for a while here too.

 

The intention was to hardcode each document type in the For Each Value. When a new document is created, you run the workflow on the container folder. Then inside the conditional sequence you compare the contents of the folder with the Current Value of the loop. The retrieve field values isn't actually necessary I realized.

If you don't have each document type inside the folder, then you'll go to the end workflow. Otherwise the workflow will continue (my tidbit here was assuming more workflow followed). 

Let me know if you have more questions

 

2 0
replied on June 16, 2015

Kevin:

Sounds doable.  I need to check a folder for the existence of one of each type of document.

What is the conditions statement on the conditional sequence that would determine whether 1 of each doc type:  (Ex: Purchase Order, Invoice, Packing Slip) exists in a particular folder that would allow me to continue my processing ?  I understand where you are going  with this process, but the details of my condition statement still would need to be correct to determine whether 1 of each type exists.

Can you help flesh this out a bit better or show what you used in this case for a conditional statement ?

 

ps: I remember seeing almost this exact example somewhere in the past as part of a LF demo.  I am having trouble finding it now in the education materials, though

 

thanks,

chris

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

Sign in to reply to this post.