AnsweredAssumed Answered

Activiti and JDK 1.8

Question asked by sebas1 on May 1, 2014
Latest reply on Feb 9, 2015 by jbarrez
Hi,

I was wondering if JDK 1.8 is supported in the latest version of Activiti?

My current processes seem to run fine in 1.8, but I ran into a little problem that probably is related to the new javascript engine (nashorn) in Java 8.

When my process has a

<scriptTask id="scripttask1" name="Set notices 0" scriptFormat="javascript" activiti:autoStoreVariables="true">
<script>nrOfNotices = 0</script>
</scriptTask>


(Javascript instead of javascript same result)

the engine gives a nice error when it encounters that scriptTask:


org.activiti.engine.ActivitiException: Job 228035 failed
        at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:101) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35) ~[activiti-engine-5.15.1.jar:5.15.1]
Caused by: org.activiti.engine.ActivitiException: Can't find scripting engine for 'javascript'
        at org.activiti.engine.impl.scripting.ScriptingEngines.getEngineByName(ScriptingEngines.java:124) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:85) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:73) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:63) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:54) ~[activiti-engine-5.15.1.jar:5.15.1]
        at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:90) ~[activiti-engine-5.15.1.jar:5.15.1]


Migrating my projects to jdk 1.8, so I would really like it if activiti would play along :)

Sebas

Outcomes