# Bug in ExecutionEntityImpl.getRootProcessInstance()

**URL:** <https://forum.flowable.org/t/bug-in-executionentityimpl-getrootprocessinstance/2553>\
**Category:** Flowable Engine\
**Created:** [September 11, 2018, 4:40pm UTC](https://forum.flowable.org/t/bug-in-executionentityimpl-getrootprocessinstance/2553 "2018-09-11T16:40:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakub\_Ferschmann](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/jakub_ferschmann/32/812_2.png) [@Jakub\_Ferschmann](https://forum.flowable.org/u/Jakub_Ferschmann)\
**Post date:** [September 11, 2018, 4:40pm UTC](https://forum.flowable.org/t/bug-in-executionentityimpl-getrootprocessinstance/2553/1 "2018-09-11T16:40:42Z")

</div>

Is it OK, that if **rootProcessInstanceId** is null than read **rootProcessInstance**? I think no.  
Flowable v6.3.1

```
protected void ensureRootProcessInstanceInitialized() {
        if (rootProcessInstanceId == null) {
            rootProcessInstance = (ExecutionEntityImpl) CommandContextUtil.getExecutionEntityManager().findById(rootProcessInstanceId);
        }
    }
```

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [September 11, 2018, 9:00pm UTC](https://forum.flowable.org/t/bug-in-executionentityimpl-getrootprocessinstance/2553/2 "2018-09-11T21:00:49Z")

</div>

You are right this doesn’t seem right @Jakub_Ferschmann.

Are you using the `getRootProcessInstance` method?

Will you be willing to provide a PR with the fix for this?

Cheers,  
Filip

---

<div class="post-metadata">

**Author:** ![Jakub\_Ferschmann](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/jakub_ferschmann/32/812_2.png) [@Jakub\_Ferschmann](https://forum.flowable.org/u/Jakub_Ferschmann)\
**Post date:** [September 12, 2018, 7:51am UTC](https://forum.flowable.org/t/bug-in-executionentityimpl-getrootprocessinstance/2553/3 "2018-09-12T07:51:39Z")

</div>

Ok, I can fix it, but I don’t know what does it mean PR.

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [September 12, 2018, 8:47am UTC](https://forum.flowable.org/t/bug-in-executionentityimpl-getrootprocessinstance/2553/4 "2018-09-12T08:47:21Z")

</div>

PR is a Pull Request. [Here](https://help.github.com/articles/about-pull-requests/) is some more information about it. In a nutshell it is a way for people to push changes from their own repositories / branches to a different repository / branch?

---

<div class="post-metadata">

**Author:** ![shareniu](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/shareniu/32/809_2.png) [@shareniu](https://forum.flowable.org/u/shareniu)\
**Post date:** [September 12, 2018, 12:20pm UTC](https://forum.flowable.org/t/bug-in-executionentityimpl-getrootprocessinstance/2553/5 "2018-09-12T12:20:18Z")

</div>

@filiphr @Jakub_Ferschmann  
I submitted this pr.

[https://github.com/flowable/flowable-engine/pull/1279](https://github.com/flowable/flowable-engine/pull/1279)

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [September 12, 2018, 7:34pm UTC](https://forum.flowable.org/t/bug-in-executionentityimpl-getrootprocessinstance/2553/6 "2018-09-12T19:34:56Z")

</div>

Thanks @shareniu we’ll look into it
