title: How to activate a scripting engine in activiti?
body: <p>I'm trying to run a short script in my workflow, this is a <code>taskListener</code> on a <code>userTask</code>:</p>
  
  <pre><code>&lt;activiti:taskListener event="create" class="org.activiti.engine.impl.bpmn.listener.ScriptTaskListener" &gt;
    &lt;activiti:field name="script" stringValue="${state='CREATED'}"&gt;
    &lt;/activiti:field&gt;
    &lt;activiti:field name="language" stringValue="JavaScript" /&gt;
  &lt;/activiti:taskListener&gt;
  </code></pre>
  
  <p>My environment seems to be missing a scripting engine though, this is the error I get:</p>
  
  <pre><code>org.activiti.engine.ActivitiException: Can't find scripting engine for 'JavaScript'
      at org.activiti.engine.impl.scripting.ScriptingEngines.getEngineByName(ScriptingEngines.java:124)
      at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:85)
      at org.activiti.engine.impl.scripting.ScriptingEngines.evaluate(ScriptingEngines.java:73)
      at org.activiti.engine.impl.bpmn.listener.ScriptTaskListener.notify(ScriptTaskListener.java:43)
      at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34)
      at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
      at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
      at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:121)
      ... 192 common frames omitted
  </code></pre>
  
  <p>Using the default engine <code>juel</code> also throws the same exception.<br/>
  Activiti is running in an OSGi/Spring environment, using the following bundles: </p>
  
  <ul>
  <li>activiti-bpmn-converter-5.21.0.jar</li>
  <li>activiti-bpmn-model-5.21.0.jar</li>
  <li>activiti-cxf-5.21.0.jar</li>
  <li>activiti-engine-5.21.0.jar</li>
  <li>activiti-image-generator-5.21.0.jar</li>
  <li>activiti-process-validation-5.21.0.jar</li>
  <li>activiti-spring-5.21.0.jar</li>
  </ul>
  
  <p>Maybe a bundle is missing?<br/><br/>
  This is the spring process engine configuration:</p>
  
  <pre><code>&lt;bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="transactionManager" ref="transactionManager" /&gt;
      &lt;property name="databaseSchemaUpdate" value="true" /&gt;
      &lt;property name="jobExecutorActivate" value="true" /&gt;
      &lt;property name="history" value="full" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I might need to add another property <code>scriptingEngines</code> but what do I have to set as <code>value</code>? In my environment I don't have any class that extends <code>ScriptingEngines</code>.
  <br/><br/>
  Environment:<br/>
  Java: jdk1.8.0_92 64-Bit<br/>
  Spring: 4.2.5<br/>
  Activiti: 5.21.0<br/></p>