cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine if document with matching keyword in another Workflow Queue.

Ryan_Wakefield
World-Class Innovator
World-Class Innovator

Let's say that I have 2 documents in a workflow life cycle in queue A. I want to make it so that an action takes a keyword from the current document and then checks if there are any other documents in queue B (same life cycle) that match the keyword value. I am 99.9% sure that there isn't an ability to do so in workflow natively, so that leads me to having to rely on a Unity Script. The problem here is that I can definitely create a query in the Unity Script and then have it return all documents in the system with a match to the keyword value, but I can't seem to find a way then to determine if any of those documents are already in queue B. I also know that you can pull a documents workflow/queue history, but that just adds a whole new level of complexity to have to potentially parse a lot of data, verify dates, etc. I also know that I could do a direct database query against the OnBase database itself, but then that just means more complexities again.

 

Then the next piece is I want to reverse this with a script that runs against documents in queue B and verify that there are no documents with a match for the keyword value in queue A.

 

Can anyone tell me if there is a way to do this with workflow natively or inside of a Unity Script or another way?

 

Thanks.

2 REPLIES 2

Paul_Lloyd
Employee
Employee

For the first problem I used the Rule Item in Particular Queue, with Related Item and Use Related for Tasks.

Here's the workflow:

 

193185868889465196b2a6a60f0b483a

And here's the Rule in detail:

7721ea58dc6a4e83b7450033fc3054b6

For each of the matching Related Documents, the Rule returns True if the Document is currently in Queue B, and displays a message box.

For this example, I use a Folder-based Portfolio Relation, matching on the Description Keyword. That way I can match multiple Doc Types

I assigned the same Portfolio Relation to Queue A, so we can see all the matching Related Documents that the Rule will be executed on.

 

bdac2acae4f840a4b36581199df3ec80

The selected document has 5 related documents with the same Description Keyword Value:

6146da4580364c368a2ad7273527e8c7

Running the ad hoc task, we find 3 matches:

e14344b7a9ca49faa626dcb806b7b2d9

0759223318864624b5c37014d1e822e6

dcf645f8cd9d4a878295bace2bdba35a

And displaying Queue B we confirm that these 3 documents are in the queue:

9a7dc5cd6efa43b9a5625e18622f1aca

Paul_Lloyd
Employee
Employee

For the second problem, I again used an  Item in Particular Queue Rule, with Related Item and Use Related for Tasks. Here's the Workflow:

 

b90724d0246a41e1aec48bd572c98896

I set a property if there's a matching document in Queue A, so I first use a Set Property Value Action to initialize it:

cb1e44037c6f4697862ca4a71a82ce59

 

Here's the Item in Particular Queue Rule, this time looking for Related Items in Queue A:

4e0f04c4170a409d9d434be0657ca10c

On True (i.e. there's a matching document in Queue A), I set propMatch to TRUE, and break processing

cc03d49eab3e435a8a3640b4209d3841

 

1bd49bf45034492b814651bffe84b713

Finally I use a Display Message Box Action to display the result:

 

cd4be82a2ff642e8978817371c126aa0