How to migrate to Graal

Hi camunda comrades! Want to solve the problem with reading ES6 in inner scripts. Right now thinking to do it with help of Graal VM in camunda v 11. But don’t know from where should I start. Can you give me any hints? Did anybody has passed this way already? Pls, share your experience.

There is a ticket to do this migration for Camunda 7.16: CAM-12103

1 Like

Sorry forgot to mention. I need the migration for the 11 version.

I think it requires code changes in Camunda.
The pull requests linked on the ticket (only visible when you login to JIRA) should give you the hints what needs to be done:

Thank you. I’m going to try,

Hi @keytavor,

in general it works for the camunda-bpm-spring-boot-starter to add these dependencies to the pom:

    <!-- Use GraalVM JavaScript for JDK > 14 -->
    <dependency>
      <groupId>org.graalvm.js</groupId>
      <artifactId>js</artifactId>
      <version>21.1.0</version>
    </dependency>  
    <dependency>
      <groupId>org.graalvm.js</groupId>
      <artifactId>js-scriptengine</artifactId>
      <version>21.1.0</version>
    </dependency>

They replace the Nashorn engine if you run JDK 8 or 11.

I have no experience with more complex scripts, but I’m curious about your results. First to get an impression, how complex a script task can get. Second about the barriers between Javascript and JDK.

A different approach, if you could not get your scripts to work correctly, is to use the external task worker and run your logic on a node.js environment: External Task Client | docs.camunda.org.

Hope this helps, Ingo