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

Question

Question

Metadata Fields not being populated from External DB Table

asked on October 1, 2016

Hi, 

 

Hope all is well, 

I have a Workflow that will populate the fields based on a Database lookup as shown below: 

Basically, I am having Import Agent bring the files in, then use Workflow to populate the fields that are based on a lookup in a SQL Table.

 

What works: 

If I do a test on 1 file at a time, it populated the fields and moves the file as required.

NOTE: (in the WF, the "for each entry" and "wait" condition were not in the WF initially).

 

What does not work at the moment:

When I add the "For Each Entry" and run it as a Business Process, the files are moved from the monitoring folder to the destination with the Template attached but the metadata is not populated. 

 

I know it is due to timing as it requires to do a table lookup, but adding a "Wait" condition does not allow me to specify the External Lookup as the result? Or does it? When I have the "Wait" condition set, I specify the below: 

 

Ideal solution, I would like for the files to move to the folder with the 5 lookup fields all populated before being moved. There are about 1500+ documents that need to be moved between each folder being monitored. 

 

Thoughts? or ideas would be much appreciated, 

 

Thank you in advance, 

 

Regards

Ziad Khamo

0 0

Replies

replied on October 3, 2016

You should not need a Wait Condition, the workflow will wait for the query to complete before moving forward. Check you Starting point for the Assigned Fields, Assigned Field Values should be set to Other, For Each Entry: Current Entry

1 0
replied on October 3, 2016

Using a different approach, what about configuring the workflow starting rule to fire when a document is created in the folder that Import Agent moves it to? That should create a separate instance for each document rather than try to iterate through a collection of documents.

That said, I would have still expected your current approach to work - I've used a similar approach for workflows that work through a large number of search hits using the For Each Entry activity. 

0 0
replied on October 3, 2016

Hi Guys, 

 

Thanks for the responses, 

With regards to your response Steve, I have set it up that way originally, hence why i am scratching my head at the moment, 

 

With regards to your response Nigel, I am yet to try the different approach, but it may be something i need to try out. Again though, I would have assumed the way it was set up should have functioned. 

 

Thanks again guys, if there is anything you would also still recommend, please feel free to.

 

Regards

Ziad Khamo

 

0 0
replied on October 3, 2016

How sure are you that your query actually returned non-blank values for the columns you used in Assign Fields? Did you try adding a Track Tokens activity?

0 0
replied on October 3, 2016

Hi Miruna, 

 

Hope all is well, and thank you for the quick response,

 

I did add the Track Token activity and it did show the data i needed to obtain from the DB. With that said, I removed the "For Each Entry" and ran the Business Process on multiple documents and that worked without issues: 

 

Ignoring the 'Track Token' activity from above, I added another Query in the DB Lookup which had the 'DocID' in it also. So now the documents are moving to the folder with the metadata populated as required, 

 

Thanks for all your help guys, if further information / assistance is needed regarding this, i will update this thread :) 

 

Thanks again

Ziad Khamo

 

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

Sign in to reply to this post.