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

Thanks @Pam Thomas , for the additional information. Which Document Type is the “CEPP Most Recent Insurance Date” KT assigned to? Is assigned to the Primary document (Review Form - Unity form) in the queue, or the Related documents student's Insurance Liability document? I'm trying to understand which document has the multiple instances of the “CEPP Most Recent Insurance Date” KT, because if for example the “CEPP Most Recent Insurance Date” KT is assigned to the Primary document, then I would assume that you would want to capture the most recent date from the multiple instances of the “CEPP Most Recent Insurance Date” KT and use this date to then evaluate with a date value on the related documents. On the other hand, if for example the “CEPP Most Recent Insurance Date” KT is assigned to the Related document type, then there needs to be a way to capture from the multiple instances of the “CEPP Most Recent Insurance Date” KT the most recent date and compare that date value to the primary document liability date.

 

Then during the Compare Liability Forms rule, if during the evaluation, it was found that there is a related Liability doc which was newer than the Review Form based on the comparison of the dates, you then copy the date from the related document to the primary document (Review Form).

 

Is my understanding correct or am I way off?

 

Regards,

George

@George Sialmas,

 

This is the case from your comments:  

"On the other hand, if for example the “CEPP Most Recent Insurance Date” KT is assigned to the Related document type, then there needs to be a way to capture from the multiple instances of the “CEPP Most Recent Insurance Date” KT the most recent date and compare that date value to the primary document liability date.

 

Then during the Compare Liability Forms rule, if during the evaluation, it was found that there is a related Liability doc which was newer than the Review Form based on the comparison of the dates, you then copy the date from the related document to the primary document (Review Form)."

 

 

Currently, the "CEPP Most Recent Insurance Date" is assigned as a keyword on both the Unity Form and the Related document

 

Unity form(UF) = CEPP - FEXP Course Form 

Related Document (RD) = CEPP - Insurance Liability

 

We can have multiple Insurance Liability documents(RD) and need to find the most recently dated Insurance Liability document (RD)(note: NOT the most recent system document date, the most recent Month/Year KW date that we convert to a date for evaluation - I would explain this further but it'll just confuse you even more probably).  We then need to compare the Most Recent Date to the Term on the Course Form(UF)to determine if it's a Renewal, Exception, or Pass (Insurance State KW).  We've also created an expression to set the Term for the date evaluation.  We just don't know how to determine the most recent Insurance Liability(RD) date property and then pass it on to the Course Form(UI).

 

(I don't know why it's making other sections green, my apologies)

@Pam Thomas , ok so the “CEPP Most Recent Insurance Date” KT is assigned to both the primary and related document type. Are you evaluating the “CEPP Most Recent Insurance Date” KT from the primary document with the “CEPP Most Recent Insurance Date” KT on the related documents? If yes, can you confirm whether there are multiple instances of the “CEPP Most Recent Insurance Date” KT on the primary document? Or are there multiple instances of the “CEPP Most Recent Insurance Date” KT only on the related documents? If you are not evaluating the “CEPP Most Recent Insurance Date” KT from the primary document, then which KT are you evaluating with and are there multiple instances of this KT on the primary doc?

 

Regards,

George

Eric_Simpson1
Star Collaborator
Star Collaborator

It looks like you are comparing prop2 from the liability doc/s to the CEPP Most Recent Insurance Date kw on the course form.  If the prop2 date is greater (newer) than the CEPP Most Recent Insurance Date you want to replace the recent insurance date value with the prop2 date value so there's only one CEPP Most Recent Insurance Date on your primary course doc, correct?

 

One possible issue is the Compare Most Recent Date KW rule is disabled, so no actions inside that rule will execute.  The Delete CEPP Form Date Prop KW action will never run.

 

Another possible issue could be the action used for Copy Most Recent Insurance Date KW or the two Replace Most Recent Insurance Date KW actions.  If you used the Copy Keyword action it would add another instance of the keyword, you probably want to use the Replace Keyword action instead.

 

Here is how I would implement this...

 

Initialize propMostRecentDate (Set Property Value or Set Multiple Property Values) to the course doc CEPP Most Recent Insurance Date.  This will track the most recent date found so far.

 

Use Related Item Exists rule to find liability docs.  Check the Use Related Items for Tasks option.

     On True... (loop through each of the liability docs found to get the propMostRecentDate)

          (presuming the liability doc date keyword only needs to be set once and never changes...)

          Keyword Value Exists?

               On True... (already set, don't need to change the date format or value on the liability doc)

                     ...nothing

               On False... (date keyword doesn't exist on liability doc)

                    Convert month and date format of liability doc in prop2

                    Use Replace Keyword action to set the keyword on the liability doc.  You may use the Delete All Existing Values option.

          Check Date Property Value... is propMostRecentDate before liability doc date kw?

               On True...

                    Set Property Value to update propMostRecentDate to liability doc date kw

               On False...

                    ...nothing

     On False... (no liability docs found)

          ...nothing

 

Check Date Property Value... is propMostRecentDate after course doc CEPP Most Recent Insurance Date kw?

     On True...

          Replace Keyword... replace CEPP Most Recent Insurance Date kw on course doc with propMostRecentDate

     On False...

          Either no liability docs were found, or the dates found on them are not newer than what's on the course doc, so do nothing.

 

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.