# Using Process variables in DMN Output

**URL:** https://forum.flowable.org/t/using-process-variables-in-dmn-output/7418
**Category:** Flowable Engine
**Created:** [January 29, 2021, 6:37am UTC](https://forum.flowable.org/t/using-process-variables-in-dmn-output/7418 "2021-01-29T06:37:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![balajisundarajan8](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@balajisundarajan8](https://forum.flowable.org/u/balajisundarajan8)
#### Post date: [January 29, 2021, 6:37am UTC](https://forum.flowable.org/t/using-process-variables-in-dmn-output/7418/1 "2021-01-29T06:37:47Z")

</div>

We are using email task to send mail, we need dynamic email body. we have used Decision table to run rule based on scenario’s it will provide output variable${emailBodyOutput}.

we are using DMN Output variable in email task against body property.

DMN Output variable is having process variables, it is not getting replaced with original value. How to use html string in DMN output variable with process variables inside. ?

When we receive email, we should have corresponding process variable value instead of ${propertyName}

**Sample DMN output variable -**

  
 Hello ${user},   
  
 Below Task has been assigned to you by ${requester}   
  
  
Thanks

**Example email msg -**

Hello ${user},

Below Task has been assigned to you by ${requester}  
Thanks

---

<div class="post-metadata">

### Author: ![yvo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/yvo/32/2231_2.png) [@yvo](https://forum.flowable.org/u/yvo)
#### Post date: [January 29, 2021, 8:05am UTC](https://forum.flowable.org/t/using-process-variables-in-dmn-output/7418/2 "2021-01-29T08:05:39Z")

</div>

Hi,

I would advise doing this a bit different. I would use the decision table to create the required output data and use that data in a separate step after that.  
For example a script or service task that uses some kind of lightweight template engine. For example Apache FreeMarker.  
(side node; The commercial solution provides features that lets you do this in a low code way)

Regards,

Yvo Swillens

---

<div class="post-metadata">

### Author: ![balajisundarajan8](https://avatars.discourse-cdn.com/v4/letter/b/e56c9b/32.png) [@balajisundarajan8](https://forum.flowable.org/u/balajisundarajan8)
#### Post date: [January 29, 2021, 8:08am UTC](https://forum.flowable.org/t/using-process-variables-in-dmn-output/7418/3 "2021-01-29T08:08:25Z")

</div>

@yvo Thanks for your quick reply.
