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

Question

Question

Using SearchRepository_FirstResult_Path Token

asked on March 5, 2015

 

 This business process places a document into a specific folder within the employee’s folder.  The document’s name is the same as the name of the Employee folder and is also the name field in the “HR Employees Folder” template.  The BP creates %(EmployeeFolderName) to hold the document name.  That token is used to find the employee’s folder with the following template search:  

{[HR Employees Folder]:[Last First I XXXX]="%(EmployeeFolderName)"} & {LF:LOOKIN="Humanresources\"}

 

 

Folder structure of the HR root folder.  Each employee folder within HR EE Personnel Files has the HR Employees Folder template attached.

 

This is the structure down to the folder that needs to receive the document

So, the path to Dusty’s CBC folder is \HR EE Personnel Files\Rhodes Dusty 4321\Employee File\Criminal Background Check

 

HR also has work-in-progress folder that contains employee folders that also have the HR Employees Folder template attached.   Note that Gern’s employee folder is in a second level folder (Form 500)

I want to move the document to \%(SearchRepository_FirstResult_Path)\%(EmployeeFolderName)\Employee File\Criminal Background Check

 

If the BP is executed to place Elvis’s CBC, %(SearchRepository_FirstResult_Path = \HR EE Personnel Files\Presley Elvis 0000
  and the document is placed correctly. 

 

 

The Problem:

When the BP executes to place Gern’s document, %(SearchRepository_FirstResult_Path  should equal \HR To Be Processed\Form 500\Blanston Gern 1234    but instead, Gern’s folder is not found …. SearchRepository_FirstResult_FullPath=\  ….and a new folder is built for Gern in the root.

(For grins, I moved Gern’s folder out of Form 500 and placed it in HR To Be Processed and the BP works as expected.)

 

So, it appears that if the employee’s folder is in the first level folder, the BP works …if it is in a lower level folder (Form 500) it doesn't work correctly.

 

Is this expected behavior?....Is this a bug?

We are using Workflow v9.0.2

Help is certainly appreciated.

 

Thanks in advance…..

Dennis

 

0 0

Answer

SELECTED ANSWER
replied on March 31, 2015

Perhaps the scenario I’ve described above is normal behavior....maybe it’s a bug that has been corrected in a newer version….but I cannot wait any longer to find out so, to move on with this assignment, I’ve moved the “Form 500” folder out of “HR To Be Processed” and made “Form 500” a first level folder under the root.  The Business Process now operates as expected.   

 

Thanks.

 

Dennis

0 0

Replies

replied on March 5, 2015

Sounds like the search repository first result is being left blank, causing the start of your path to be missing and creating everything in the root.

You can verify the search is not coming up with anything from the tokens tab based on search results found.

In this case, try searching with the same advanced search using the client. This way you can verify that the search is not able to find the folder only while it is in the "Form 500" folder. Once you can show it is not working in the client it should be easier to find the cause.

0 0
replied on March 5, 2015

There is no sort order to the results returned by Search Repository, so the path to the first result is not guaranteed to be the same every time. So you might be getting a hit in the root of the repository first. Have you tried adding a Track Tokens activity to see what the value actually is?

0 0
replied on March 6, 2015

Hi Miruna and Chad…

That’s right Chad….the search repository first result for Gern is being left blank, causing the start of the path to be missing and creating everything in the root.

I was unaware of the Track token activity (thanks for the heads up) before I started this so I did the next best thing I could think of….I emailed the token values to myself so I could see their values.  Gern’s value for Searchrepository_Firstresult_Path was always \  instead of \HR  To Be Processed\Form 500\ …

 

I added a Token Track activity to the BP….everything else remained the same…..

For Gern:   

 

For Bea:

For this test, I copied Gern’s employee folder into HR EE Personnel Files folder AND left the other one in \HR  To Be Processed\Form 500\

Next, from the client I did a template search for Gern’s folder with these results:

 

The highlighted folder is located in \HR  To Be Processed\Form 500\ but this is not reflected in the Path.  Interestingly enough, if I right-click on it in the search results and Open Containing Folder…takes me to the document in \HR  To Be Processed\Form 500\...which it is supposed to do.

 

Regards

Dennis

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

Sign in to reply to this post.