@StephenOTT I have found your post stating that execution.createIncident() is non-blocking.
So I tried to throw an exception with JavaScript:
throw new Exception();
Then I got the error message:
Unable to evaluate script while executing..
When I used throw new java.lang.Exception(“exception message”);
I got the message:
Unable to evaluate script while executing activity 'X' in the process definition with id 'X':<eval>:1:30 Expected an operand but found error throw new java.lang.Exception(“exception message”); ^ in <eval> at line number 1 at column number 30
First of all how I can throw an exception in a script task (just to test it) and what exceptions can be thrown?