UML sequence diagrams model the flow of logic within your system in a visual manner, enabling you both to document and validate your logic.