Activiti 6.x and Mail Task - How get enviroment properties using expression

21 Views Asked by At

I have a simple BPMN diagram with just a Start --> Mail Task --> End

In the Mail Task I want set the "to", "from" and "Subject" using "expression"

my goal for example is to make the "to" (recipent of the mail), dynamic.. where the email address should be taken from the "application properties" and if missed as fixed

conceptually I want write similar to

${env.getProperty("mypropemailto") ? {env.getProperty("mypropemailto") : "[email protected]"}

there is a way to implement it ?

env.getProperty is just an example.. the idea is to get value from the activiti-app.properties and so if set.. use it or if missed used a fixed one..

Reason: I have QA and PROD env.. and if both are deploying the same BPMN (becasue QA is a backup of PROD), really I don't want sent mail to real recipient but to a "specific one" I cannot use process/task variable too.

Can you suggest something ?

Thanks Rob

Trying to use expression, it seems not able to replace properties or calling "functions"

0

There are 0 best solutions below