# Problem in call activity with multiple instances

**URL:** <https://forum.flowable.org/t/problem-in-call-activity-with-multiple-instances/6968>\
**Category:** Flowable Engine\
**Created:** [October 24, 2020, 10:14am UTC](https://forum.flowable.org/t/problem-in-call-activity-with-multiple-instances/6968 "2020-10-24T10:14:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharifitabar](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/sharifitabar/32/2062_2.png) [@sharifitabar](https://forum.flowable.org/u/sharifitabar)\
**Post date:** [October 24, 2020, 10:14am UTC](https://forum.flowable.org/t/problem-in-call-activity-with-multiple-instances/6968/1 "2020-10-24T10:14:23Z")

</div>

Hi,  
I am using the callActivity in my project and faced the following issue:

When I use callActivity with multiInstanceLoopCharacteristics feature, the binding of expressions do not work properly, but when I use without this feature, everything is correct.

Here is the XML section of my process definition:

```
<callActivity id="ubi_id-31a1f64a-e42f-4906-b736-cb9c57ab83c8" name="Call Process" calledElement="XYZ">
    <extensionElements>
    <flowable:in sourceExpression="${m}" target="n"/>
     <flowable:out sourceExpression="${n}" target="m"/>
     </extensionElements>
     <multiInstanceLoopCharacteristics isSequential="true" flowable:elementIndexVariable="loopCounter">
     <loopCardinality>1</loopCardinality>
     </multiInstanceLoopCharacteristics>
</callActivity>

```

I expect that the result of variable “m” is passed to sub-process as variable “n” and after return from execution of sub-process, the variable “n” from sub-process is passed to “m”. But the result of “m” after return from the sub process is “NULL”.  
But When I eliminate the “multiInstanceLoopCharacteristics” section and call activity without iteration ans repeat, the result is correct.

Thanks and best regards,  
Abbas

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [October 28, 2020, 8:39pm UTC](https://forum.flowable.org/t/problem-in-call-activity-with-multiple-instances/6968/2 "2020-10-28T20:39:57Z")

</div>

Which version are you using (there were some changes in this area in latest release)?  
You’ve validated that the called process sets the variable n?

---

<div class="post-metadata">

**Author:** ![sharifitabar](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/sharifitabar/32/2062_2.png) [@sharifitabar](https://forum.flowable.org/u/sharifitabar)\
**Post date:** [October 31, 2020, 6:51am UTC](https://forum.flowable.org/t/problem-in-call-activity-with-multiple-instances/6968/3 "2020-10-31T06:51:08Z")

</div>

Hi,  
I am using version 6.5.0.  
I have validated and I am sure that the called process sets the variable n because I can use it in the callee sub-process, but in return and only in case of putting multiInstanceLoopCharacteristics section, the callee does not return the variable m.

Thanks again,  
Abbas

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [November 9, 2020, 8:16am UTC](https://forum.flowable.org/t/problem-in-call-activity-with-multiple-instances/6968/4 "2020-11-09T08:16:40Z")

</div>

Ok - 6.6.0 is released now, so potentially the bug is fixed there. But a small unit test with what you’re seeing would help a lot for us to reproduce the problem you’re seeing.
