# Assign timer timeout from EL expression

**URL:** <https://forum.flowable.org/t/assign-timer-timeout-from-el-expression/1796>\
**Category:** Flowable Engine\
**Created:** [March 26, 2018, 8:30pm UTC](https://forum.flowable.org/t/assign-timer-timeout-from-el-expression/1796 "2018-03-26T20:30:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgrouch](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@mgrouch](https://forum.flowable.org/u/mgrouch)\
**Post date:** [March 26, 2018, 8:30pm UTC](https://forum.flowable.org/t/assign-timer-timeout-from-el-expression/1796/1 "2018-03-26T20:30:55Z")

</div>

How can I assign timer timeout from EL expression or variable value?  
Currently “timerdurationdefinition” takes only literal constants. What is the way to set it from  
inside workflow programmatically?

Thanks,  
–MG

---

<div class="post-metadata">

**Author:** ![martin.grofcik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/martin.grofcik/32/71_2.png) [@martin.grofcik](https://forum.flowable.org/u/martin.grofcik)\
**Post date:** [March 27, 2018, 5:46am UTC](https://forum.flowable.org/t/assign-timer-timeout-from-el-expression/1796/2 "2018-03-27T05:46:49Z")

</div>

Hi,

As you can see in e.g. `org.flowable.engine.impl.bpmn.behavior.IntermediateCatchTimerEventActivityBehavior` timer definition is parsed directly from the definition. That’s why no expressions are allowed.  
If you want to change it add expression evaluation timer definition parsing to each of XYZ\_TimerActivityBehaviors. (and create a pull request)

Martin

---

<div class="post-metadata">

**Author:** ![mgrouch](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@mgrouch](https://forum.flowable.org/u/mgrouch)\
**Post date:** [March 27, 2018, 4:00pm UTC](https://forum.flowable.org/t/assign-timer-timeout-from-el-expression/1796/3 "2018-03-27T16:00:34Z")

</div>

Is there way to assign it from some kind of listener at workflow runtime on the timer itself?

Thanks

---

<div class="post-metadata">

**Author:** ![martin.grofcik](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/martin.grofcik/32/71_2.png) [@martin.grofcik](https://forum.flowable.org/u/martin.grofcik)\
**Post date:** [March 27, 2018, 7:53pm UTC](https://forum.flowable.org/t/assign-timer-timeout-from-el-expression/1796/4 "2018-03-27T19:53:53Z")

</div>

The easiest way (AFAIK) is to ad expression evaluation to ActivityBehavior and add timer definition parsing.

Martin

---

<div class="post-metadata">

**Author:** ![mgrouch](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@mgrouch](https://forum.flowable.org/u/mgrouch)\
**Post date:** [March 30, 2018, 9:46pm UTC](https://forum.flowable.org/t/assign-timer-timeout-from-el-expression/1796/5 "2018-03-30T21:46:40Z")

</div>

That would require code change in flowable. Is there a way to achieve same with existing flowable code base?  
Thanks
