I ran into an issue with a flow who stopped with an error, giving no more details than :
UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 2033648372-927914 (81955499).
The log showed no error at all, just endend after a decision. I could isolate and reproduce the issue:
- I created a SObject Test__c with a field named TimeField__c, and an instance of it, and then created a flow with this decision:
Then I debugged the flow, not even changing the time, and I got this error : Value of class com.force.swag.soap.Time is not a ValueType: STRING
It's obviously a Salesforce bug, I should be able to check if a time field changed.
Record.Timefield__c != Record_Prior.Timefield__c or using a formula to compare values didn't help, the bug's still here.
I found however a workaround that I'll share in an answer.