Restarting external process loses connection

I have a process flow working and have nodejs external processes. The first time I start the process everything is fine. If I then kill the process to make a change and restart, although the script console tells me its connected, starting a new process instance in the engine fails to connect to the external script. It feels like the engine is still trying to talk to the now dead process and of course gets stuck at the activity or event point that is using the external process.

Is there a safe way to attach, detach and reattach an external process, preferably with an example? This is killing the ability to develop against the engine.

Camunder Docker: camunda/camunda-bpm-platform:latest


Further to the issue, I am seeing the following in docker engine logs when I run the script and it subscribes to the topic

camunda_1             | WARNING: An illegal reflective access operation has occurred
camunda_1             | WARNING: Illegal reflective access by org.apache.ibatis.ognl.OgnlRuntime (file:/camunda/lib/mybatis-3.5.3.jar) to method java.util.HashMap$Values.size()
camunda_1             | WARNING: Please consider reporting this to the maintainers of org.apache.ibatis.ognl.OgnlRuntime
camunda_1             | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
camunda_1             | WARNING: All illegal access operations will be denied in a future release

Is that relevant?