I have separated out the script into this simplified BPMN file with just 2 tasks.
Service Task with the Password Generator JS file
User Task to stop Execution
When I try to start this process manually in the Tasklist, this is the message I get;
The process could not be started. :
Cannot instantiate process definition PasswordTest Unable to evaluate script while executing activity 'Activity_0dasfj' in the process definition with id 'PasswordTest:eb-bb95-0242ac170002':<eval>:50:0 Invalid return statement
return generatePassword();
^ in <eval> at line number 50 at column number 0
I’m at a loss since I’m pretty sure this ran great for weeks without a problem.
Here is the full trace stack from the original Process;
org.camunda.bpm.engine.ScriptEvaluationException: Unable to evaluate script while executing activity 'Activity_0yk8nmj' in the process definition with id 'user_setup:30:45-024170002':<eval>:50:0 Invalid return statement
return generatePassword();
^ in at line number 50 at column number 0
at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluate(SourceExecutableScript.java:71)
at org.camunda.bpm.engine.impl.scripting.ResourceExecutableScript.evaluate(ResourceExecutableScript.java:46)
at org.camunda.bpm.engine.impl.scripting.ExecutableScript.execute(ExecutableScript.java:63)
at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:101)
at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:87)
at org.camunda.bpm.engine.impl.delegate.ScriptInvocation.invoke(ScriptInvocation.java:47)
at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:58)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:92)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:63)
at org.camunda.bpm.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior$1.call(ScriptTaskActivityBehavior.java:55)
at org.camunda.bpm.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior$1.call(ScriptTaskActivityBehavior.java:51)