Setting up Dynamic Data Inputs to an Email Message

Data fields available to the process can be used to dynamically set parts of the email at runtime, using either %FieldName% notation or the Select Data Field or Formal Parameter dialog.

See Defining an E-Mail Service Type from a Service Task.

However, a process formal parameter, or a package-level or process-level data field that is defined as an external reference to an attribute of a class defined in a business object model (that is, as structured data), cannot be used in this way.

Procedure

  1. Create an activity-level data field on the Data Fields tab of the email service task. The data field:
    • must be defined as a simple type that matches the type of the attribute you want to reference.
    • must not have the same name as an existing formal parameter, or package-level or process-level data field.
  2. On the Scripts tab, define an Initiate Script to assign the value defined in the desired attribute to the data field.
    Note: The attribute must have been populated earlier in the process - for example -- by collecting the data on a form.
  3. On the General or E-Mail tab, enter the local data field name at the appropriate place, using either %FieldName% notation or the Select Data Field or Formal Parameter dialog (as described in Defining an E-Mail Service Type from a Service Task).