# Is the processEngine available in a script task?

**URL:** <https://forum.flowable.org/t/is-the-processengine-available-in-a-script-task/3063>\
**Category:** Uncategorized\
**Created:** [December 14, 2018, 10:14am UTC](https://forum.flowable.org/t/is-the-processengine-available-in-a-script-task/3063 "2018-12-14T10:14:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spille](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/spille/32/19_2.png) [@spille](https://forum.flowable.org/u/spille)\
**Post date:** [December 14, 2018, 10:14am UTC](https://forum.flowable.org/t/is-the-processengine-available-in-a-script-task/3063/1 "2018-12-14T10:14:44Z")

</div>

Hi,

We a migrating from an activiti stack to flowable and we have scripts running that use the processEngine and they look like this:

```
import org.activiti.engine.runtime.ExecutionQuery;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.runtime.Execution;

RuntimeService runtimeService = processEngine.getRuntimeService();
List<Execution> executions = 
   runtimeService.createExecutionQuery()
      .variableValueEquals("MyVar", MyVar).list();

```

If we run this in activiti, all is well. If we run this script in Flowable we can a 500 error saying No such property: processEngine for class:

```
import org.flowable.engine.runtime.ExecutionQuery;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.runtime.Execution;

RuntimeService runtimeService = processEngine.getRuntimeService();
List<Execution> executions = 
   runtimeService.createExecutionQuery()
      .variableValueEquals("MyVar", MyVar).list();

```

Is it expected behaviour that we can no longer use this in flowable?

---

<div class="post-metadata">

**Author:** ![mdg](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/mdg/32/3390_2.png) [@mdg](https://forum.flowable.org/u/mdg)\
**Post date:** [February 6, 2024, 3:13pm UTC](https://forum.flowable.org/t/is-the-processengine-available-in-a-script-task/3063/2 "2024-02-06T15:13:49Z")

</div>

This may answer your question: [Flowable Migration Guide : Flowable or Activiti v5 to Flowable V6 · Flowable Open Source Documentation](https://www.flowable.com/open-source/docs/migration/#engineservices-removed)
