Troubleshooting
Problem
Leases with dates before 1970 cause Workflows (WF) to loop infinitely when generating Payment Line Items (PLIs). This occurs with any platform level calculations using dates prior to 1970. Also, dates way in the future will appear to be in an infinite loop.
Symptom
The Lease PLI generation process is causing very high WF counts and an infinite number of records if the user enters dates like 03/01/0007 to 02/28/0025.
For example:
1. Create a lease with commencement date 03/01/0007 and expiration date as 02/28/0025
2. Add payment schedules under the lease with any amount so that you have 18 payment schedules,
3. Activate the lease
4. Upon activation and approval the system will start generating PLIs and Workflow Events. This will continue infinitely causing system slowness.
Expected Result:
1. The system should generate only 216 PLI (12 PLI each for 18 schedules)
Cause
This is related to the way in which Java calculates dates based on milliseconds after January 1, 1970.
Resolving The Problem
In order to restrict the user from using the years prior to 1970 the customer can develop application logic on the Application Settings record that identifies 1970 and after. Then use this field in the workflow validation logic to show a message if a year prior to this value is used.
This validation should be applied for Commencement Date and Expiration Date, Accounting Start and End Dates, Payment Schedule Start and End Dates.
On a related topic if you have dates way in the future (for example 10001) it will appear to go into an infinite loop. However, we consider these as valid years. The event queue is increasing because the events are being generated for all the future years. That could take several months to complete. If you do not want to use future years that far in advance, you can develop similar application logic by having a field on the Application Settings record to define the number of years in the future you will allow and use this field in the workflow validation logic to show a message if a year later than that value is used.
This validation should be applied for Commencement Date and Expiration Date, Accounting Start and End Dates, Payment Schedule Start and End Dates.
Was this topic helpful?
Document Information
Modified date:
25 May 2022
UID
swg21986577