1.4 KiB
1.4 KiB
Guide de Gestion d'Erreurs - RPA Vision V3
Vue d'ensemble
Le système de gestion d'erreurs fournit une récupération automatique robuste pour les échecs d'exécution de workflows.
Types d'Erreurs
1. MATCHING_FAILED
Aucun node ne correspond à l'état actuel.
Stratégies: PAUSE (si < 0.70), RETRY (si proche seuil)
2. TARGET_NOT_FOUND
Élément UI cible introuvable.
Stratégies: Fallbacks visuels/position, RETRY, SKIP
3. POSTCONDITION_FAILED
Post-conditions non satisfaites.
Stratégies: RETRY (timeout augmenté), ROLLBACK
4. UI_CHANGED
Interface changée significativement.
Stratégies: PAUSE pour analyse manuelle
Utilisation
from core.execution.error_handler import ErrorHandler
from core.execution.action_executor import ActionExecutor
# Configuration
error_handler = ErrorHandler(
error_log_dir="data/errors",
max_retry_attempts=3,
ui_change_threshold=0.70
)
# Intégration
executor = ActionExecutor(error_handler=error_handler)
# Exécution
result = executor.execute_edge(edge, screen_state)
# Statistiques
stats = executor.get_error_statistics()
print(f"Erreurs: {stats['total_errors']}")
Logs
Chaque erreur crée:
error_report.json- Rapport détailléscreenshot.png- Screenshotstate_embedding.npy- Embedding
Tests
- Tests unitaires:
tests/unit/test_error_handler.py - Tests d'intégration:
tests/integration/test_error_recovery.py