generateOutputDoc Step
Description:
The GenerateOutputDoc workflow step generates a PDF document from the supplied Document Content. You can specify an optional template file, and the step stores the generated output document name in the configured Variable or Global variable. The step is defined in the Forms category as a Process step with two incoming and two outgoing connections.
The step supports:
- Specifying an optional template file.
- Providing document content using Rich Text Content.
- Generating a PDF document from the supplied content.
- Storing the output document file name in a Variable or Global variable.
- Reusing the generated document reference in subsequent workflow steps.
- Creating workflow-generated document output.
- Returning a True or False result for subsequent workflow processing.
Inputs
- Path to the template file – The Path to the template file property specifies the path to a template file that can be used when generating the output document.
- Document Content – The Document Content property specifies the Rich Text Content that is used to generate the PDF document.
- Variable/Global to hold the file name of the output document - The Variable/Global to hold the file name of the output document property specifies the Variable or Global variable in which the file name of the generated output document is stored.
Returns
- True – The True return path can be connected to the next workflow activity after the PDF-generation operation succeeds.
- False – The False return path can be used for error handling or an alternative workflow path if the document-generation operation does not succeed.
Usage:
The GenerateOutputDoc step is typically placed after you collect, generate, or prepare document content within a workflow.
The workflow supplies Rich Text Content to the Document Content property and can optionally specify a template file. The step generates a PDF document and stores its output file name in the specified Variable or Global variable.
A typical workflow pattern is:
Prepare Document Content → Generate Output Doc → Use Generated Document
The generated document can then be used by later workflow steps to:
- Create workflow-generated PDF output.
- Store or process the generated document.
- Send the document to users.
- Attach the document to a message or notification.
- Provide the document to a downstream activity.
- Perform additional document processing.
- Maintain a generated document reference in a Variable or Global.

Typical Workflow Suggestions:
Generate a PDF from Rich Text Content
Use GenerateOutputDoc when a workflow has document content that needs to be converted into a PDF document.
Example:
Prepare Content → Generate Output Doc → Continue Process
Generate a Customer Document
A customer-processing workflow can dynamically create a PDF containing customer-related information.
Example:
Get Customer Data
↓
Build Document Content
↓
Generate Output Doc
↓
Store Output File Name
Generate an Invoice PDF
GenerateOutputDoc can be used after invoice information has been prepared.
Example:
Retrieve Invoice Data
↓
Prepare Document Content
↓
Generate Output Doc
↓
Send/Process Invoice
Generate a Report
Use the step when workflow-generated information needs to be produced as a PDF report.
Example:
Collect Results → Build Report Content → Generate Output Doc → Distribute Report
Generate a Document from a Template
The Path to the template file property can be used when a template file is part of the document-generation process.
Example:
Retrieve Data
↓
Prepare Document Content
↓
Generate Output Doc
↓
PDF Output
Create a Standardized PDF Document
A workflow can use a consistent document-generation approach for recurring business documents.
Examples include:
- Customer documents.
- Request summaries.
- Process reports.
- Approval documents.
- Business correspondence.
- Generated workflow output.
A typical pattern is:
Workflow Data
↓
Document Content
↓
Generate Output Doc
↓
PDF File
Generate Approval Documents
An approval workflow can generate a PDF after collecting the required business information.
Example:
Request Submitted
↓
Approval Data
↓
Build Document Content
↓
Generate Output Doc
↓
Approved Document
Generate a Process Summary
GenerateOutputDoc can be placed near the end of a workflow to produce a PDF summary of the process.
Example:
Process Data → Build Summary → Generate Output Doc → Complete
Generate Documents from Form Data
Form values can be incorporated into the Rich Text Content before the GenerateOutputDoc step executes.
Example:
Form Submission
↓
Retrieve Form Values
↓
Build Document Content
↓
Generate Output Doc
Generate a PDF Before Sending a Notification
A workflow can generate the PDF first and then use the resulting document information in subsequent notification processing.
Example:
Prepare Content
↓
Generate Output Doc
↓
Send Notification
Store the Output File Name for Reuse
The output file name is explicitly stored in a Variable or Global variable.
Example:
Generate Output Doc
↓
outputDocumentFile
↓
Multiple Subsequent Steps
Generate Documents Conditionally
GenerateOutputDoc can be placed on a particular branch when a PDF is required only under certain conditions.
Example:
┌─ Generate Output Doc
Decision ────────┤
└─ Other Processing
Generate Documents as the Final Workflow Output
Place the step near the end of a workflow when the PDF is the final output of the process.
Example:
Complete Processing
↓
Prepare Final Content
↓
Generate Output Doc
↓
Final PDFUse the Generated Document in Subsequent Processing
Because the output file name is stored in a Variable or Global, subsequent activities can reference that value.
Example:
Generate Output Doc
↓
Store File Name
↓
Document Processing
↓
Notification / Storage / Distribution
Example:
Let’s build and execute the “generateOutputDocDef” example.
- Create a new definition called “generateOutputDocDef” and open the definition in designer mode.
- Drag a “generateOutputDoc” step to the canvas.
- Connect the dots between the “Start” and “generateOutputDoc” steps, as shown above.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, you can configure additional values.
- Define a variable or a global to store the output file path.
- Click the “generateOutputDoc” step to configure its “Required” properties. Provide a name for the step. Click the button to enter the document content in rich text format. Provide the variable or global reference to store the output file path. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.

- Click the button to include the rich text document content. A pop-up window appears for configuration. Using the rich text user interface, enter the required text. Click the Save button.

- Click the “generateOutputDoc” step to configure its “Optional” properties. Provide the template path to use for generating the PDF document. Click the Save button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Configure the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, and execute it. Render the process instance and click the Create Output Doc step to view its properties. When the workflow reaches the GenerateOutputDoc step, FlowWright uses the configured Document Content and, when provided, the configured template file to generate the PDF document. The output document's file name is stored in the specified Variable or Global variable. Subsequent workflow activities can then use the generated document information.

- The PDF document, which contains rich text, is rendered here for reference.

Tips:
- Provide meaningful Document Content that clearly represents the purpose of the generated PDF.
- Remember that Document Content is required.
- Use the Path to the template file property when a template is required; the property is optional.
- Use a meaningful Variable or Global name for the generated document file name, such as
outputDocumentFile. - Verify that the Variable or Global used for the output is available to subsequent workflow activities.
- Test the generated PDF using representative document content before deploying the workflow.
- Verify that the generated output document is produced as expected after workflow execution.
- Keep reusable document templates organized and maintainable.
- Test document generation after changing the template or document content.
- Validate dynamic values before inserting them into the document content.
- Use consistent formatting when generating recurring business documents.
- Separate document-content preparation from document generation when designing larger workflows.
- Reuse the generated output file reference rather than duplicating document-generation logic.
- Connect the True return path to the normal continuation of the workflow.
- Consider connecting the False return path to appropriate error handling.
- Test documents containing different lengths of content.
- Test representative rich-text formatting before deploying a production workflow.
- Verify that downstream activities use the correct Variable or Global containing the output document file name.
- Keep sensitive information out of log messages when the generated document contains confidential information.
- Do not assume specific template-processing, formatting, file-storage, or PDF-rendering behavior beyond what has been confirmed for the FlowWright implementation.
Definition Sample:
You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Before executing a workflow containing the GenerateOutputDoc step, verify:
- The Create Output Doc step has been added to the Process Definition.
- Document Content has been configured.
- The Document Content contains the information required for the generated PDF.
- A template file path has been configured if a template is required.
- A Variable or Global has been defined to hold the output document file name.
- The upstream workflow activity is connected to the GenerateOutputDoc step.
- The True path is connected to the normal continuation path.
- The False path is connected to appropriate alternate or error handling where required.
- Logging has been configured if workflow progress needs to be documented.
- The generated PDF has been tested using representative content.
- Downstream activities reference the correct output-document Variable or Global.