Search code examples
oopewam

eWAM - In Wynsure - Invalid time format error in aWFOperationAssignment object


When processes like GBP Subscription/Member Enrollment/Member Endorsement are performed and when these processes are accepted, the system throws an error as:

“Object of the class type aWFOperationAssignment cannot be stored in the database with the corresponding NSID, ID & Version”

and the transaction is roll-backed with the below error shown in the error report.

“The transaction is roll backed. Err Code= 22007. ErrMsg=SQLState=22007 . [Microsoft][SQL Server Native Client 10.0]Invalid time format”.

This happens only in few of the environments. Not sure if this is a code or configuration issue.


Solution

  • This issue is caused because of the “Bank Holidays Context” configuration in Wynsure.

    In the Bank Holidays (Business Administration -> General Settings -> Bank Holiday), the End Time is supposed to be configured in 24 hr time format. If this is configured as for example: 8 for start and 5 for end time, instead of 8 for start and 17 for end time, then the duration is calculated incorrectly. Note that Wynsure tries to subtract the start time from the end time (in this case, it tries to subtract 8 from 5 and gives an incorrect duration)

    This configuration will cause an issue while processing any transactions because at the completion of any transaction a corresponding operation is created with 2 fields viz., “Expected Limit Date” and “Expected Limit Time” and this field uses the difference between the “End Time” and “Start Time” to calculate the expected date and time limit. As the difference between the End Time & Start Time will return an incorrect value, an invalid date & time will be calculated and the system will throw an error with the invalid date and time format and the transaction is rolled back.

    To fix this issue, the “End Time” should be configured in 24 hr time format.