processInstanceAuditReport Step
Description:
The Generate Process Instance Audit Report step enables a FlowWright workflow to generate a PDF audit report for a specified process instance.
Audit reports provide a permanent record of workflow execution and are commonly used for compliance, operational auditing, troubleshooting, customer reporting, and archival purposes. This step accepts a process instance identifier, generates a PDF report containing the audit information for that workflow execution, and stores both the physical file path and the virtual file path of the generated report in workflow variables or global variables.
The generated report can then be archived, emailed, uploaded to a document management system, or made available for download through workflow forms or portals.
Typical uses include:
- Generating workflow execution reports
- Producing compliance documentation
- Archiving completed workflow audits
- Providing reports to business users
- Supporting operational investigations
- Documenting approval histories
- Creating customer-facing audit reports
- Maintaining process execution evidence
This step simplifies audit report generation by automatically creating a reusable PDF document representing the execution history of a specific process instance.
Inputs
- Enter Process Instance ID - Specifies the unique identifier of the process instance for which the audit report will be generated.
- Variable/Global that Store the Output Physical File Path - Specifies the workflow variable or global variable that will receive the physical location of the generated PDF report.
- Variable/Global that Store the Output Virtual File Path - Specifies the workflow variable or global variable that will receive the virtual path (URL) of the generated PDF report.
Returns
- True – The audit report was successfully generated, and both the physical and virtual file paths were stored in the configured workflow variables or global variables. Workflow execution continues through the success path.
- False – The audit report could not be generated because of an invalid process instance identifier, unavailable process data, file generation error, insufficient permissions, or another execution error. Workflow execution follows the alternate path.
Usage:
The Generate Process Instance Audit Report step is typically used after a workflow instance has completed or reached a significant milestone where an execution record needs to be preserved.
During execution:
- Read the configured process instance identifier.
- Retrieve the audit information for the specified workflow instance.
- Generate the audit report as a PDF document.
- Store the physical file path in the configured workflow variable or global variable.
- Store the virtual file path in the configured workflow variable or global variable.
- Continue workflow execution through either the True or False return path.
A typical workflow might look like this:

Typical workflow scenarios include:
- Generating audit reports after workflow completion
- Producing compliance evidence
- Creating execution reports for customers
- Archiving workflow history
- Supporting internal audits
- Generating approval documentation
- Providing downloadable audit reports through workflow portals
Example:
Let’s build and execute the “processInstanceAuditReportDef” example.
- Create a new process definition named “processInstanceAuditReportDef” and open it in designer mode.
- Drag a “processInstanceAuditReport” step to the canvas.
- Connect the dots between the “Start” step and “processInstanceAuditReport” steps, as shown above.
- Define a variable or a global to store the output file path.
- Click the “processInstanceAuditReport” step to configure its “Required” properties. Provide a name for the step and the process instance GUID. The process instance page displays the GUID for all existing items, which you can copy and paste into the input field. Provide a variable or global reference to store the physical and virtual output paths. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

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

- Save the process definition, create a process instance, and execute it. The Step should generate a process instance audit report for the selected instance ID. Render the process instance and verify the step properties.

- Use the “variable.virtualfilepath” to download the PDF audit report. The content sample is shown below.

Tips:
- Generate audit reports after important workflow milestones or after workflow completion.
- Store the physical and virtual file paths in reusable workflow variables for downstream processing.
- Archive generated reports to satisfy governance and compliance requirements.
- Use the virtual file path when sending downloadable links to users.
- Route the False path to logging and notification steps for easier troubleshooting.
- Combine this step with Send Email, Archive Process Instance, Get Virtual URL for a File, ZipFile, Upload Document, or document management steps to automate complete audit reporting workflows.
Notes:
- All three configuration properties are required.
- The step generates a PDF audit report for the specified process instance.
- The generated report's physical and virtual paths are stored in the configured workflow variables or global variables.
- The process instance itself is not modified.
- Both the True and False return paths should be implemented to provide complete workflow handling.
- Ensure that the FlowWright application has permission to generate and store PDF reports.
- Report generation details are recorded in the FlowWright workflow execution log.
Generate Process Instance Audit Report vs. Generate Definition Audit Report:
Although both steps generate PDF audit reports, they target different workflow entities.
| Generate Process Instance Audit Report | Generate Definition Audit Report |
|---|---|
| Generates an audit report for a specific workflow execution (process instance). | Generates an audit report for a workflow definition (process design). |
| Requires a Process Instance ID as input. | Requires a Process Definition ID as input. |
| Reports on execution history, runtime activities, and instance-specific audit information. | Reports on the workflow definition and its associated audit information. |
| Used for operational auditing, execution reviews, troubleshooting, and compliance evidence. | Used for governance, documentation, design reviews, and process lifecycle management. |
| Stores both the generated physical and virtual report paths. | Stores both the generated physical and virtual report paths. |
As a general guideline:
- Use Generate Process Instance Audit Report when auditing a completed or running workflow instance and documenting its execution history.
- Use Generate Definition Audit Report when documenting or reviewing the workflow definition itself for governance, compliance, or design purposes.
Definition Sample:
You may download the sample workflow definition from the link provided and import it into your FlowWright environment.
Note: Verify and complete any missing configuration after importing the sample, including:
- Process instance identifier
- Physical report path variable or global variable
- Virtual report path variable or global variable
- Success and failure workflow branches
- Appropriate permissions for PDF generation and file storage
After verifying the configuration, save and publish the workflow before execution.