05-20-2021 05:57 PM
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.
05-21-2021 03:11 AM
For the first problem I used the Rule Item in Particular Queue, with Related Item and Use Related for Tasks.
Here's the workflow:
And here's the Rule in detail:
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.
The selected document has 5 related documents with the same Description Keyword Value:
Running the ad hoc task, we find 3 matches:
And displaying Queue B we confirm that these 3 documents are in the queue:
05-21-2021 03:59 AM
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:
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:
Here's the Item in Particular Queue Rule, this time looking for Related Items in Queue A:
On True (i.e. there's a matching document in Queue A), I set propMatch to TRUE, and break processing
Finally I use a Display Message Box Action to display the result:
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.