Example of generating a formatted PDF document
In BMC Helix Business Workflows you can generate PDFs for required case data. To automatically generate formatted PDFs, you need to create a document template to define the format and content of the PDF document, include the Generate PDF element in a process and add the document template as an Input parameter for the element, and then define an action for the PDF document.
This example uses a scenario for generating a PDF document for a Visa letter. A case agent creates a case for an employee who requires a Visa letter. When certain criteria are fulfilled, a PDF of the visa letter is automatically generated and sent to the requester as an email notification.
Generating a PDF document for a Visa letter
This section covers an end-to-end example of creating a document template for a visa letter and generating a PDF for the visa letter request.
Peter is a case business analyst. He wants to create a document template for Visa letter. To create the document template, on the Create Document Template page, he adds the field values as shown in the following figure:
In the Document Body section, to navigate to the Edit Expression page, Peter clicks . He then selects case fields and dynamic fields as variable values from the list and saves the document template.
After the document template is created, Peter creates an automated task template of Create Visa letter for an employee by creating a new process.
After the automated task template is created, Peter edits the process by clicking the Edit Process option on the task template screen. In the Process designer of BMC Helix Innovation Studio, along with the other required elements, Peter includes the Generate PDF element to generate the PDF and the Send Notification Using Event element to send the generated PDF to the employee. The input to the Generate PDF element is the Visa letter document template, the case record, and the name of the PDF file. The output of the Generate PDF element, which is the PDF file is the input to the Send Notification Using Event element.
After the process is modified, Peter associates the automated task template with a case template—Visa letter request.
When a requester submits a request for visa letter, a case agent creates a case by using this case template. The automated task of Create visa letter for an employee is executed when the case is in the In Progress status. A PDF that displays the text based on the document template structure and case specific parameters is automatically generated.
Further, this PDF is sent as an attachment while sending the email to the requester.
Related topics