cancel
Showing results for 
Search instead for 
Did you mean: 

Can't find scripting engine for 'javascript'

rasmi
Champ in-the-making
Champ in-the-making
hi,

I get an exception in the script task:

  <scriptTask id="scripttask1" name="Number of Times Reminded" scriptFormat="javascript" activiti:autoStoreVariables="true">
      <script>var loopCount=0;
           if(${loopVar}){
                loopCount=${loopVar};
            }
           loopVar=loopCount++;
     </script>
</scriptTask>

SEVERE: exception during timer execution
org.activiti.engine.ActivitiException: Can't find scripting engine for 'javascript'
   at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:65)
   at org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:51)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)

The script task is after a timer task:

    <sequenceFlow id="flow17" sourceRef="boundarytimer1" targetRef="scripttask1"></sequenceFlow>

Please help.

Thanks.
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
What JDK are you running? DO you have a scripting-implementation on your class path that support javascript? Try adding rhino…

jbarrez
Star Contributor
Star Contributor
Javascript needs to be with a capital first character.

rasmi
Champ in-the-making
Champ in-the-making
Thank you for the reply. I am using JDK 1.5. Added rhino 1.7R4 version also. I still get the same error. I tried changing "javascript" to "Javascript", after saving and running, it automatically changes to "javascript". Is there any other possible solutions?

Thanks in Advance.

rasmi
Champ in-the-making
Champ in-the-making
Thank you for the reply. I am using JDK 1.5. Added rhino 1.7R4 version also. I still get the same error. I tried changing "javascript" to "Javascript", after saving and running, it automatically changes to "javascript". Is there any other possible solutions?

Thanks in Advance.

jbarrez
Star Contributor
Star Contributor
Here is a process which works for me: https://github.com/jbarrez/activiti-advanced-scripting/blob/master/src/test/resources/org/activiti/t...

I don't know about JDK 1.5 and Rhino, that is pretty old stuff to begin with :s