cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about out of the box activiti email task.

ssun
Champ on-the-rise
Champ on-the-rise
Where can I find a complete list of ${variables} that I can use in the email? And I not only want to use it in the email body but a lot of other places such as use ${initiator} of the process, ${assignedTo} on the cc line. Use ${businessKey} of the process on the subject line, etc.

Thank you very much!

–Gordon
5 REPLIES 5

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Gordon,

Variable list depends on the process instance (you can create variables in runtime). The easiest way to get a variable list is
  • debug the process instance
  • write variables into the log
  • check DB for variables
Regards
Martin

ssun
Champ on-the-rise
Champ on-the-rise
Thank you Martin. I tried to use ${businessKey} and did not work. I guess it is not in the variable list of the process. I guess I have to copy it to the list, right?

trademak
Star Contributor
Star Contributor
Hi,

businessKey is not a variable that's correct. execution is and you could get to the business key via that perhaps, so execution.businessKey. In addition you can reference variables directly. That's it basically.

Best regards,

ssun
Champ on-the-rise
Champ on-the-rise
I tried ${execution.businessKey} but it does not work. I was using it in a simple email task. And I'm 100% sure the business key is set on the process instance when I start it. It seems that ${execution.businessKey} is something with an empty value. Unlike just ${businessKey} , it does not throw exception.

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

use getProcessBusinessKey() instead


/** The business key for this execution. Only returns a value if the delegate execution
   * is a process instance.
   * 
   * @deprecated use {@link #getProcessBusinessKey()} to get the business key for the process
   *             associated with this execution, regardless whether or not this execution is a
   *             process-instance.
   */
  String getBusinessKey();
 
  /**
   * The business key for the process instance this execution is associated with.
   */
  String getProcessBusinessKey(); 

Regards
Martin