TritonFlow
Documentation for the TritonFlow Apex class that provides core logging functionality for Flow Builder and Process Builder.
Overview
The TritonFlow class provides the server-side implementation for Flow and Process Builder logging. It handles automatic transaction management, Flow context capture, and validation of logging parameters.
Flow Logging Methods
log
Creates logs from Flow or Process Builder. This method will:
Create logs with default INFO level if not specified
Handle automatic transaction management
Capture Flow context (Interview GUID, Flow API Name)
Process custom field mapping through JSON
Validate category and log level enums
Field Mapping Reference
Core Fields
category()
flowLog.category
No
type()
flowLog.type
No
area()
flowLog.area
Yes
level()
flowLog.level
No
summary()
flowLog.summary
Yes
-
details()
flowLog.details
No
-
operation()
flowLog.operation
No
-
For complete builder method documentation, see TritonBuilder Reference.
Context Fields
🔍 Flow Context The system automatically captures and sets critical Flow execution context:
Interview GUID for tracking specific Flow runs
Flow API Name for identifying the Flow definition
Transaction ID for cross-context correlation
Additional Fields
Custom fields can be passed through the additionalFields
JSON string:
Automatic Behaviors
⚡ Smart Defaults The system provides intelligent default behaviors to ensure robust logging:
Transaction Management
Creates new transaction if none exists
Maintains transaction context across Flow elements
Issue Creation
Automatically creates issues for ERROR level logs
Links related records for context
Batch Processing
Buffers logs for efficient processing
Flushes logs after batch completion
Validation Rules
Required Fields
area
- Functional area identifiersummary
- Log message summaryinterviewGUID
- Flow interview identifier
Enum Validation
The system validates and provides fallbacks for:
Log Level
Defaults to INFO with warning
Category
Defaults to Flow with warning
Error Handling
📝 Validation Messages When validation issues occur, the system:
Applies appropriate defaults
Appends warning messages to the details field
Continues processing without interruption
Related Classes
The TritonFlow class works with:
FlowLog - Main wrapper for Flow log data
TritonBuilder - Core log building functionality
TritonTypes - Enums and constants
Last updated