Support Article
Errors when using DateTimeDifference function
SA-96046
Summary
Errors in logs when strategy uses expression with the DateTimeDifference function, although the functionality works as expected.
Error Messages
Incompatible pega type -datetime for java type - (Java ClipboardProperty, PropertyInfoType: , PegaType: unknown), in function definition-DateTimeDifference
Steps to Reproduce
- Create a strategy
- Use an expression with the DateTimeDifference function
- Run the flow
Root Cause
User had two overloads of the DateTimeDifference function. One had JavaType (ClipboardProperty) mapped to Pegatype(Datetime). During the process of finding the right candidate, the system gets all the Rule-Utility-Function (RUF) with the name DateTimeDifference, irrespective of Rule Set and Library.
The error we see in the logs, is during the process where all the RUF is collected and the filtering starts. This is expected as JavaType (ClipboardProperty) was mapped to Pegatype(Datetime).
Resolution
Perform the following local-change:Map the JavaType to an empty Pegatype in the RUF.
Published January 10, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.