java.lang.NumberFormatException when using variables

I'm using a variable to control the delay seconds in rule machine 5.1. It was working before but recently it's starting to throw the error "java.lang.NumberFormatException: For input string: "Delay" on line 8989 (method allHandlerX)"

Here's the rule:

The error message

The variable

Any thoughts? Is this related to the very recent hub hubdate of strings and variables? Thank you!

Please show the entire rule, and turn on all logging for the rule. Then post the logs again for the rule being triggered...

2 Likes

It turned out to be that colon in the variable names were not parsed correctly by the platform. I renamed all variables from "Delay: ABC" to "Delay ABC" and the error was gone.

Also, when Rule Machine did not handle renaming variables correctly when the variables are used in a "Delay" clause.

Hope this helps!

Very nice sleuthing! Thanks.

About the colon, that makes sense. There is a list of disallowed characters in a variable name, and that list should, but does not now, include colon. That will get fixed forthwith.

Could you tell me which "Delay" didn't update for you?

Sorry this was a while ago, but IIRC, the Delay in the screenshot above didn't update to the new variable name correctly. It becomes broken but when I click on it and get to the drop down, the variable corrects itself. It feels like it's tracking the correct internal representation but somehow the name or the actual variable wasn't right.

This isn't very helpful but this is what I can remember. In short, I believe renaming variables will break "variables used in action delays."

Yeah, I think I found where that happens, and why. Your description is perfect. I was able to get the same result. Fix will be forthcoming for this one as well.

2 Likes