HRSystem { # HR System n1: circle label:"Start" n2: rectangle label:"Collect timesheet data" n3: rectangle label:"Import attendance records" n4: rectangle label:"Calculate gross pay" n5: rectangle label:"Finalize payroll" n6: circle label:"End" n1.handle(right) -> n2.handle(left) n2.handle(right) -> n3.handle(left) n3.handle(bottom) -> PayrollEngine.n7.handle(top) [label="Process"] n4.handle(bottom) -> Compliance.n14.handle(top) [label="Validate"] n5.handle(right) -> n6.handle(left) } PayrollEngine { # Payroll Engine n7: rectangle label:"Apply pay rates" n8: rectangle label:"Calculate overtime" n9: rectangle label:"Add bonuses and commissions" n10: rectangle label:"Process deductions" n11: diamond label:"Deductions valid?" n12: rectangle label:"Calculate net pay" n13: rectangle label:"Flag for review" n7.handle(right) -> n8.handle(left) n8.handle(right) -> n9.handle(left) n9.handle(right) -> n10.handle(left) n10.handle(right) -> n11.handle(left) n11.handle(right) -> n12.handle(left) [label="Yes"] n11.handle(bottom) -> n13.handle(top) [label="No"] n12.handle(top) -> HRSystem.n4.handle(bottom) [label="Calculated"] n13.handle(top) -> HRSystem.n4.handle(bottom) [label="Review needed"] } Compliance { # Compliance n14: rectangle label:"Withhold federal taxes" n15: rectangle label:"Withhold state taxes" n16: rectangle label:"Calculate FICA" n17: rectangle label:"Process benefits deductions" n18: diamond label:"Compliance check passed?" n19: rectangle label:"Generate pay stubs" n20: rectangle label:"Flag compliance issue" n14.handle(right) -> n15.handle(left) n15.handle(right) -> n16.handle(left) n16.handle(right) -> n17.handle(left) n17.handle(right) -> n18.handle(left) n18.handle(right) -> n19.handle(left) [label="Yes"] n18.handle(bottom) -> n20.handle(top) [label="No"] n19.handle(bottom) -> Banking.n21.handle(top) [label="Disburse"] n20.handle(top) -> HRSystem.n4.handle(bottom) [label="Fix required"] } Banking { # Banking n21: rectangle label:"Create ACH batch file" n22: rectangle label:"Submit to bank" n23: rectangle label:"Confirm transfers" n24: rectangle label:"Update payroll records" n21.handle(right) -> n22.handle(left) n22.handle(right) -> n23.handle(left) n23.handle(right) -> n24.handle(left) n24.handle(top) -> HRSystem.n5.handle(bottom) [label="Complete"] }