I'm having some trouble with a Search Repository step in a Workflow.
Here's what I'm doing:
In Forms, I have a process for submitting new user account requests. Within this process, if the requested user is external to our organization, I'm triggering a public process for submission of our Confidentiality Agreement (sending a link to the public process in an Email Service Task) . Since public processes can't be tucked inside other processes (so my account request process won't know when that public process has completed), I want to use Workflow to identify when that Confidentiality Agreement has been returned.
In the URL that opens the public process (for the confidentiality agreement), I'm passing the InstanceID of the account request process. Then, when the public form is submitted, I'm saving that InstanceID into the metadata of the confidentiality agreement, in a field named ReferenceID. This all works.
I'm building a Workflow that launches from my account request process.
I'd like this Workflow to search the repository to see if the confidentiality agreement is there (looking for a form with the metadata field of ReferenceID that matches the InstanceID of the account request process). If it finds the confidentiality agreement, I'd like it to Set Business Process Variable (variable named conf_agreement_returned = TRUE).
Here's my problem:
My search query will return "1 result found" if I manually enter the values into the "Test Search Query" box, BUT... when I actually run the Workflow, I always get "No entry was found". I tried adding a 5 minute timer in the process between sending the link to the form and checking to see if the document is there (I'm submitting immediately in testing), but that didn't help, so I don't think there's a timing issue.
Here's my search query:
{[]:[ReferenceID]="%(BP Instance ID)"} & {LF:LOOKIN="myRepo\IT Userforms\%(RetrieveLaserficheFormsContent_year)\%(RetrieveLaserficheFormsContent_request_type)\%(RetrieveLaserficheFormsContent_last_name), %(RetrieveLaserficheFormsContent_first_name)"}
It's the same result whether I have quotes around %(BP Instance ID) or not.
Can anyone assist?