Cannot run a JavaScript code in a Script Task

Hi,

I’m testing the trial version of the enterprise subscription of Flowable (v3.10.3), and I’m facing issues using the Script Task within a process.
I selected “JavaScript” for the Script format, and tried to run a simple script ( var test =1; ), but an error keeps occurring when I run the process on flowable work.

imagem flowable

I get this error: " Can’t find scripting engine for ‘javascript’ "

Can anyone please help? :slightly_frowning_face:

Thank you in advance.

This could be related to the java version that you are using.
I think Nashorn (the javascript engine in java) has been deprecated in later versions.
https://openjdk.java.net/jeps/335

1 Like

Thank you @maudrid
I was able to solve my issue with your help. :grinning:

hello , I’m new at coding
I’m soo confused about these codes, I’m just put some wrong codes and it’s not working well , can you give me any tips for it

Same issue.
.

i got same issue. and i don’t know how to solve this

i don’t know how to solve this..

Hey everyone,

For everyone that does not understand how to solve this and why the problem is there. Starting from Java 15 the Javascript Nashorn engine has been removed from the JDK JEP 372: Remove the Nashorn JavaScript Engine.

If you want to keep using Javascript you will need to manually add Maven Central Repository Search.

Cheers,
Filip