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

Question

Question

Workflow not moving documents

asked on December 28, 2016

Hi All,

 

Not sure if this has been asked, but what I would like to achieve is to be able to add metadata on documents that have been added into Laserfiche. 

 

I have a migrated folder that has all the documents in it "170000+ documents in folders" and I want Workflow to pick up each file and route it to the correct folder with Metadata filled in based on a SQL Query.

 

Here is what I am finding a bit confusing:

1. When running the Business Process on more than 10+ documents at a time, nothing happens to the files.

2. When running the Business Process on less than 10 at a time, it works fine.

3. Running it on a single file, it works fine. 

4. Scheduling Workflow does not start anything? and no files are being moved at all.

 

I have attached a screenshot of the Workflow. Any input would be kindly appreciated:

 

  

The idea is to have the file move to its correct folder based on a query to obtain its metadata. 

Am I missing anything here? 

 

Will be more than happy to add more details, if required. 

 

Thank you

Ziad Khamo

0 0

Answer

SELECTED ANSWER
replied on January 3, 2017

So what is the starting entry in this case? You're searching for entries, but you're using %(Entry Name) for the query. %(Entry name) refers to the starting entry, so the query results will always be the same and have nothing to do with the search results.

0 0

Replies

replied on December 28, 2016

Hi Ziad,

I'm not quite clear on everything that your workflow definition is doing.

Is the "search repository" activity in the workflow the same one you showed that finds the 170000+ documents? And it's those 170000+ documents that you basically want to assign metadata to based off of an SQL query and then route each document to an appropriate folder?

If that's the case, then I would expect to see a "for each entry" activity after your search where the SQL query, metadata assignment, and entry move is done inside that loop for each document that was returned by the search.

However, you also mention running this as a business process and perhaps even running it on a per document basis. If that's the case, then is it not supposed to do the search and instead, just do the SQL query, metadata assignment, and document move just on the selected document(s)? If that's what you're trying to accomplish, then I think removing the "search repository" activity would better allow it to be used as a business process.

If you are trying to accomplish the former, then perhaps having this run as a scheduled workflow would be optimal.

0 0
replied on December 28, 2016

Hi Alex, 

 

Thank you for the detailed response, 

Basically what you mentioned in the first paragraph is what I am trying to achieve. I have made the changes you highlighted and set to run as a scheduled workflow as we speak. I have set it to look into on specific folder at the moment to make sure it is correct, before I select all. 

 

 

Hoping this will work 

Thanks again Alex,

 

Regards

Ziad

0 0
replied on December 28, 2016 Show version history

Hi Alex, 

 

Further to the above, I am getting a 'One or more required fields were omitted or had a blank value. [9066]' error when i am checking the error log Workflow Administration Console. This is when I have the Worflow run on a scheduled task. No documents Move at all. 

 

I have 2 fields that are required, one is the saved by username (in this instance it will be Workflow), the next and for this error is pointing at a pattern match we created to obtain the folder name. 

 

The error is for the following activity in Workflow - 'Assign CC from Radix' which is basically filling in details based on the Query and a Pattern Match (in this instance it is the Folder name). If you require me to open a case I will do so before I post the error log details. 

 

 

Thank you in advance, 

Regards

Ziad

0 0
replied on December 29, 2016

Can you confirm that the %(CC Folder Path) token contains valid data when your workflow is running?

0 0
replied on December 29, 2016

Is "Client Documents" the name of the repository? Entry paths do not include the repository name, so this pattern wouldn't find matches.

Also, please limit your search to 1000 entries or less at a time. Loops over very large entry sets are not efficient.

0 0
replied on December 29, 2016

Hi Miruna,

 

'Client Documents' is a folder in the repository. It is not the name of the repository. 

 

Hi Alex, 

 

i will confirm this with track tokens. 

 

Thank you,

Ziad 

0 0
replied on December 29, 2016

Hi Alex, 

 

I have added a track token just under the pattern match and it does show me a result of the Folder name as required for the field. So I am still unsure why it would error out? 

 

Hi Miruna,

 

I have set this to run now on a specific folder that has about 20 documents (using Workflow 'Run Current Workflow') . The files move to the correct folder, but with that said, they all have the same metadata? I specified when assigning values to Each searched Entry - Current Entry. 

 

 

If I select Starting Entry - only 1 file moves with the right data. I know I am doing something wrong, but would love to pin point it if possible. 

 

Thank you

Ziad

0 0
replied on December 29, 2016

It's hard to guess without seeing the workflow. It probably has something to do with how your Query Data activity is set up.

0 0
replied on December 29, 2016

Hi Miruna, 

 

The Query data is shown below. 

 

The above is how it is configured, the fields are basically getting populated from the Query, 

 

Thank you

Ziad

 

0 0
replied on December 30, 2016

Hi Miruna,

 

Please let me know if further information is required. I will be more than happy to provide it. 

 

Thank you

Ziad 

0 0
SELECTED ANSWER
replied on January 3, 2017

So what is the starting entry in this case? You're searching for entries, but you're using %(Entry Name) for the query. %(Entry name) refers to the starting entry, so the query results will always be the same and have nothing to do with the search results.

0 0
replied on January 3, 2017

Hi Miruna, 

 

Thank you for this, that was the issue! Once this was changed from %(Entry name) to %(ForEachSearchedEntry_CurrentEntry_Name) it worked fine. 

 

Thank you again for your assistance in this as well, 

 

Regards

Ziad Khamo

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

Sign in to reply to this post.