Open mirela-solomon opened 9 months ago
We're also getting this on 4.0.0. Using UUID's as state machine identifier. It complains about dash, since it's interpreted as regex special character:
java.util.regex.PatternSyntaxException: Illegal character range near index 10 [6b7d358e-de78-4c80-ad8f-af33a2f3da09|15] ^ at java.base/java.util.regex.Pattern.error(Pattern.java:2028) at java.base/java.util.regex.Pattern.range(Pattern.java:2820) at java.base/java.util.regex.Pattern.clazz(Pattern.java:2708) at java.base/java.util.regex.Pattern.sequence(Pattern.java:2139) at java.base/java.util.regex.Pattern.expr(Pattern.java:2069) at java.base/java.util.regex.Pattern.compile(Pattern.java:1783) at java.base/java.util.regex.Pattern.<init>(Pattern.java:1430) at java.base/java.util.regex.Pattern.compile(Pattern.java:1069) at java.base/java.lang.String.replaceFirst(String.java:2898) at org.springframework.statemachine.processor.StateMachineHandlerCallHelper.getCacheEntries(StateMachineHandlerCallHelper.java:356) ...
Hi,
I've encountered the following problem on spring-statemachine version 3.2.0.
We have the following configuration:
From the service we are trying to do:
StateMachine<S, E> stateMachine = stateMachineService.acquireStateMachine(id);
When providing an id that contains special regex characters like: "stateMachineService.acquireStateMachine("${ticketId}"), the state machine instance get blocked and is completely unusable. PatternSyntaxException are logged from the StateMachineObjectSupport methods but no exception is thrown and we are not able to get a response from acquireStateMachine method.
I tried to acquire the stateMachine and then manually start the machine, but I'm not able to get the errors from startup and not able to treat this scenario.
I'll attach the debug logs for this issue: logs_state-machine.txt