How can I include the job ID in the Build Manifest email template?

You can use ANT scripting to add the job ID.

Description

The Output Generator does not have any parameters to customize the HTML file that is sent so you need to build or modify the HTML file. The conductor file where your transformation scenario resides is written in ANT script language so you can use ANT to customize and edit the HTML file that is sent. It is also possible to generate this HTML file from your DITA-OT plugin and use it as the notification.

Solution

There are two options to do the customization. Both options require the code update in the bmanifest-extension-client.xml in the target bmanifest_postprocess_client. Method 1 is easier to implement.

Both methods require these steps:
  1. Copy the body_html_file_template to the ${bmanifest.global.dir}.
  2. Modify this file with the new content that you want.
  3. Set the property bmanifest.smtp.message either from the file ${outgen.resources.dir.client}/buildmanifest.smtp.properties or comment the property bmanifest.smtp.message.file in the buildmanifest.smtp.properties but set the property into the target bmanifest_postprocess_client.
Method 1 uses the properties file:
  1. The outgen.job.source.name.noext parameter is the filename of the Build Manifest with it's extension.
    Note: In a DRM deployment, the filename and ID are different.
  2. The bmanifest.title parameter contains the title of the build manifest.
Method 2 reads the attributes within the Build Manifest file:
  1. Extract the ID with an xml task and store it into a new property.
    <xmltask source="${bmanifest.file.fullpath}">
    <xmlcatalog refid="ot.catalog"/>
    <copy path="/build-manifest/@id, '/')" property="outgen.job.bmanifest.id"/>
    </xmltask>
  2. The outgen.job.source.name.noext parameter is the filename of the Build Manifest with it's extension.
    Note: In a DRM deployment, the filename and ID are different.
  3. The bmanifest.title parameter contains the title of the build manifest.