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

Question

Question

Search Repository activity returns no results even when test query works

asked on June 16, 2015

We have a Forms process that invokes workflow to save the partially completed form to a Waiting folder and then once the final approval is done invokes a second workflow that retrieves the entry using Search Repository and fills the final data in. The Search Repository is not returning the result. I have spent 3 hours troubleshooting it as the tests in designer and the client work fine.

Using Search Repository to search for a single entry match in a single text field, a drop down "Pending" field, and a folder search. Once retrieved we make it the starting entry and go from there. Looks like this:

The token we're using in the search is the Forms _Start Date token which I previously write to the metadata of the form sort of as a serial # if you will.

This search returns no results during any real world tests as per below:

However, if I Track Tokens directly ahead of the Search Repository I return:

If I copy and paste that token into Test Query in the Workflow Designer on the failed instance it returns the result as expected: (Returned 1 result)

If I use the same search syntax in the client and paste that token value into the advanced search it also returns the result.

Why is it failing in the real world?

0 0

Answer

SELECTED ANSWER
replied on June 16, 2015 Show version history

I can't really help you for the dates as I imagine it is something weird about them not lining up correctly with hours/minutes/seconds, but I can recommend what I do in these cases. I like using instance ID tokens ({/dataset/_instance_id}) in forms which translates to FormsBPInstanceID in workflow. It appears to be fully unique and is easy to find from a workflow after you initially saved the form to Laserfiche using the forms engine. Keep in mind the token will complain as it is hidden when you publish, but it will work.

pic1.PNG
pic2.PNG
pic3.PNG
pic1.PNG (7 KB)
pic2.PNG (12.63 KB)
pic3.PNG (12.65 KB)
1 0

Replies

replied on June 16, 2015

I should also add that I've checked the login credentials of the workflow and manually logged into the client with them to prove that the workflow user has rights to the files in question.

I have also thought that perhaps the _Start Date token is a date/time token and doesn't like being compared to a String Value in a search so as you see in the screenshot I created a new string token and assigned it the value of _Start Date so it for sure was a string. Even then, using that new token in the search syntax had the same failure.

0 0
replied on June 17, 2015

Ah! Thanks for the tip. I've never pushed past that warning. Good to know it works. I believe I'll use that method next time. In this case I just used a bunch of form fields to search against the metadata to make sure it's the right one. It works in this case so we're out of the woods.

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

Sign in to reply to this post.