cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Related Document Processing

Dominique_Clack
Confirmed Champ
Confirmed Champ

Hello, I am currently working on a workflow that is processing a course form primary document with multiple related documents of liability forms. The related docs have a month and year keyword that I turn into a date using expressions and lastly into a date keyword (EX. June 2023 becomes 06/02/2023).  

I add the liability form date keywords to the primary document and the problem arises when I am trying to evaluate multiple related documents based on the date created. I have implemented the rule “check date keyword” rule to check the liability form date KW against itself, and if D1 comes before D2, it should delete the older keyword and the newer keyword should be placed on the primary document. This works well with only2 documents but with 3+ related documents, the workflow continues to cycle through the rest of related documents and adds those keywords as well. Below are a few screenshots to show how the process is working currently.

c7d9e0290b99465087d2da20e3fb1019 

 

This screenshot above represents the solution attempt, the first rule “Liability Forms Exists?” is working on the related document of liability form while the second rule, “Compare Liability Form Date Keywords” is working on the primary document of course form. 

e2f34932939449c8b1ebd5a23501403f

 

This screenshot above shows the results of the keywords after the logic above is ran. Ideally the older “CEPP Most Recent Insurance Date” KW would not appear and only the newest date would appear. Any help, suggestions, or tips is appreciated. The only thing I can think of to assist with the processing of multiple related documents in this manner is the “break processing” rule but I am not too sure where the best spot for this rule would be. 

3 ACCEPTED ANSWERS

George_Sialmas
Elite Collaborator
Elite Collaborator

@Dominique Clackum Instead of using the “check date keyword” rule, what if you use an expression to compare the two dates? Just a thought.

 

Respectfully,

George

View answer in original post

Pam_Thomas
Star Contributor
Star Contributor

@George Sialmas 

 

I am pretty sure the "CEPP Most Recent Insurance Date" on the Primary doc should be a copied property or KW value from the evaluation of the Related Items "CEPP Most Recent Insurance Date". We only want one value, the greatest or most recent date.  I apologize but we have tried so many different things, it's confusing at this point. But let me see if I can break it down better. I have a feeling I'm doing a terrible job of explaining.

 

Primary Doc:  CEPP - FEXP Course Form (Unity Form - created by a DIP from a data feed file)

Related Doc: Insurance Liability - may have multiple documents in OnBase
                           Insurance Liability KT - Month
                           Insurance Liability KT - Year

 

propTest = Conversion of Month KT by expression IIF(%K00129 ="JANUARY";"01"; for every month-K00129=Month


prop2 = Setting a Date via expression Date(%K00130;%VpropTest;02) to get a date of ex: 01/02/2024-K00130=Year 
This is all to get a valid date to complete further evaluation.

 

Now we need to cycle through all of the Insurance Liability docs (Related docs) to find the one with the most current date that should be stored as propLiabilityNewest. This propLiabilityNewest  we need to do one of the following:

1 - Set as a keyword "CEPP Most Recent Insurance Date" KT on the Related doc then copy to the Primary Doc

or

2 - Use the property to just set the "CEPP Most Recent Insurance Date" KT on the Primary Doc

 

In the end, the Most Recent Date from the evaluation of all of the Insurance Liability documents (Related docs) should be on the Primary Doc for further evaluation.  One date, not multiple.  We need the greatest Date from the Month / Year keywords from the Related Docs to be passed to the Primary Doc.

 

Then we'll do the next evaluation of the Term to the "CEPP Most Recent Insurance Date" on the Primary Doc to find the status we'll set of Renew, Exception, or Pass

 

Our problem is with doing the evaluation of multiple Related documents to get the greatest date, then passing it to the Primary doc to complete further evaluations, whether that be by keyword or property, whichever works best. 

 

*Our properties will be renamed, we're just trying to get this working right now. 

 

I hope that is a better explanation.  We want to evaluate multiple related items to get one date value (the greatest or newest date) to pass to our primary document.   

 

Related docs

ex:  Insurance Liability 1 = May 2025

        Insurance Liability 2 = Sept 2026

        Insurance Liability 3 = April 2024

        Insurance Liability 4 = Jan 2023

 

We want it to pass the Sept 2026 date from our Related doc to our Primary doc in this case.

View answer in original post

Kevin_Perron
Star Collaborator
Star Collaborator

TLDR

 

FWIW - We had a solution for Aid Letters at one place I worked.  The aid letters would come into OnBase multiple times a day for potentially the same student.  The goal was to have the most recent one available in the student portal, keep the older ones, but not have them show in the portal.  The solution was simple to identify the most recent document.  All Aid Letters went into a SYS - Fin Aid Processing Lifecycle, they all had student ID on them already, so they would look for any other Aid Letters for that student for this aid cycle.  If it found one, we used a simple Fin Aid Doc Status KW to designate the current "Active" aid letter.  So if this is the first Aid Letter, it would set the status to Active.  If it found an older Aid Letter with an Active KW, the process would set that documents status KW to "Inactive" and then set its status KW to Active.  For our purposes it was a simple way to track the "most recent" copy of a specific document type, by student ID.  No expressions needed, simple compare of KW with Document Property...  

 

Sounds like yours gets a degree more complicated, as it is inspecting a KW data field but I thought I would share in case it helps you find a way to solve the problem.

 

Basically, as soon as you can, identify the most recent "related" document as it moves into or through a shadow / system lifecycle, so maybe when you need to work with the related document(s) in Workflow, you don't have to find the correct one each time with this logic, you can simply find it with a status.

 

Good luck

KP

View answer in original post

34 REPLIES 34

George_Sialmas
Elite Collaborator
Elite Collaborator

@Dominique Clackum Instead of using the “check date keyword” rule, what if you use an expression to compare the two dates? Just a thought.

 

Respectfully,

George

Thanks George, I tried to add both the Liability form date KW and most recent date KW to my primiary document of course form using the "set property to expression" rule. This is my expression with K00254 being the Liability date KW and K00256 being the most recent insurance date keyword. 

 

iif(%K00254 > %K00256;
%K00254;%K00256)

 

I was hoping this expression would evaluate if the Liability form date KW is more recent than the most recent date KW, then set the property to the to the Liability form date KW and if it is not, it would continue to be the most recent insurance date KW. 

 

The only problem I ran into with this seems to be working with multiple keyword instances with different values on the same document. My expression is evaluated as an array or list of these KWs instead of being individually evaluated. Would you happen to have any ideas to make each individual keyword be evaluated instead of combined as a list?

 

Here is a picture below of the array from the On-Demand Diagnostics:

 

@Dominique Clackum Without knowing your solution and how it is configured or the business use case, why are there multiple date keyword type instances on the same document?

 

Regards,

George

Hi George,

 

  Dominique is OOO at the current time so I'll see if I can explain.  This is a process to determine if a students Insurance Liability is good for the semester or requires renewal.  We are checking for a valid date on a liability doc (which is the related item to the Review Form - Unity form) and there could be multiple liability docs in OB.  We need to check the Related Items to obtain the most up-to-date liability doc date - We have a Month & Year keyword on the related item (these are separate keywords) and then convert that to a date.  We need to capture the newest dated related item as a property and then copy that property to the Review Form to compare that date to the current term to determine if the insurance liability has to be renewed.  It will either require renewal, be an exception to be reviewed, or it will be good and can complete the process.  We are trying a new way now under the rule ?Compare Liability Forms which is set to Use Related Items for Tasks.   Basically, we have to evaluate all related item docs to get a date property, then use that property to complete another evaluation against the Unity Form driving the workflow to determine renewal or not.

 

66386e435c20414ebcd1b2c6931be0a1

 

3dd2449697cf48408964a83291136e9b

90c7cb16eb3c4d17abe14001c798483c

 

  I hope that makes sense.

 

Thanks!

Pam