Camunda run and process instances inconsistencies

I have been following the series of tutorials for Java development and JS.

Problem:
When following the examples I am getting inconsistencies when running the application in node and java and also process instance inconsistencies in the Camunda Platform EE.

Each time when I run the java class I sometimes get the Logger message and most of the time I don’t. When I run the js component the cursor hangs and sometimes prints completed and the process instance in Camunda does not update for either Java or JS.

Steps to run java class:

maven install and then right click class and run.

Steps to run node:

from directory in command line run node ./component.js

Tutorial link: Tutorial: Camunda Enterprise Edition for Java Developers (Video 2) - YouTube

IDE: Intellij
Java version: SDK 14 and Compiler 8
Node version: v16.6.2

Java class:

Please note as I am a new user I can only upload one media image.

Is there something I am missing?

Thanks for your help.