# Script Task : groovy code not executed

**URL:** <https://forum.flowable.org/t/script-task-groovy-code-not-executed/1469>\
**Category:** Uncategorized\
**Created:** [January 19, 2018, 5:05pm UTC](https://forum.flowable.org/t/script-task-groovy-code-not-executed/1469 "2018-01-19T17:05:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erixx](https://avatars.discourse-cdn.com/v4/letter/e/82dd89/32.png) [@erixx](https://forum.flowable.org/u/erixx)\
**Post date:** [January 19, 2018, 5:05pm UTC](https://forum.flowable.org/t/script-task-groovy-code-not-executed/1469/1 "2018-01-19T17:05:18Z")

</div>

Hi,

I use Flowable as embedded into a java project.  
My script tasks, described below, are mentionned in the log, but are not executed,  
One of you sees something wrong ?

Step 1 / i export the flowable-modeler into a xml file, i get this section (among other xml code) :

> ```
> <scriptTask id="script1" name="script1" scriptFormat="groovy" flowable:autoStoreVariables="false">
> <script>
> <![CDATA[
> execution.setVariable("isavailable", false);
> println "isavailable: " + isavailable;
> execution.setVariable("comesfrom", "UK");
> ]]>
> </script>
> </scriptTask>
> 
> ```

Do you confirm the “\<![CDATA[” ??  
Because it is not mentionned into the example given by the [doc](http://www.flowable.org/docs/userguide/index.html#bpmnScriptTask), the doc shows the groovy code directly between the tags.

2 / When i execute this code as embedded into a java project into Eclipse, the script is mentionned into the log, but it is not executed :

> ```
> [DEBUG] (ContinueProcessOperation.java:executeActivityBehavior:223) Executing activityBehavior class org.flowable.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior on activity 'script1' with execution 117515
> 2018-01-19 14:53:57,776 [DEBUG] (DefaultFlowableEngineAgenda.java:planOperation:83) Operation class org.flowable.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation added to agenda
> 2018-01-19 14:53:57,776 [DEBUG] (CommandInvoker.java:executeOperation:83) Executing operation class org.flowable.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation 
> 2018-01-19 14:53:57,776 [DEBUG] (AbstractHistoryManager.java:isHistoryLevelAtLeast:47) Current history level: AUDIT, level required: ACTIVITY
> 2018-01-19 14:53:57,776 [DEBUG] (TakeOutgoingSequenceFlowsOperation.java:leaveFlowNode:131) Leaving flow node class org.flowable.bpmn.model.ScriptTask with id 'script1' by following it's 1 outgoing sequenceflow
> 
> ```

=\> NO ERROR, but data are still the same …

---

<div class="post-metadata">

**Author:** ![PascalSchumacher](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/pascalschumacher/32/336_2.png) [@PascalSchumacher](https://forum.flowable.org/u/PascalSchumacher)\
**Post date:** [January 19, 2018, 8:08pm UTC](https://forum.flowable.org/t/script-task-groovy-code-not-executed/1469/2 "2018-01-19T20:08:30Z")

</div>

I believe the CDATA is correct.

Do you have groovy on the classpath (don’t know how flowable handles missing scripting languages)?
