Validé sur PC Windows (DESKTOP-58D5CAC, 2560x1600) : - 8 clics résolus visuellement (1 anchor_template, 1 som_text_match, 6 som_vlm) - Score moyen 0.75, temps moyen 1.6s - Texte tapé correctement (bonjour, test word, date, email) - 0 retries, 2 actions non vérifiées (OK) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8.9 KiB
Requirements Document
Introduction
Ce document définit les exigences pour la composition et le contrôle de flux des workflows dans RPA Vision V3. Il couvre le chaînage, les sous-workflows, la fusion, ainsi que les structures de contrôle fondamentales (boucles, conditions, déclencheurs) essentielles à tout système RPA.
Glossaire
- Workflow : Graphe de transitions entre états d'écran représentant un processus automatisé
- Chaînage : Exécution séquentielle de plusieurs workflows où la fin de l'un déclenche le début du suivant
- Sous-workflow : Workflow réutilisable pouvant être appelé depuis d'autres workflows
- Fusion : Combinaison de deux workflows partageant des nodes similaires en un seul workflow optimisé
- Node de référence : Node spécial qui appelle un sous-workflow
- Boucle : Répétition d'une séquence de nodes N fois ou jusqu'à une condition
- Branchement conditionnel : Choix du chemin d'exécution basé sur l'état de l'écran
- Déclencheur : Événement qui lance automatiquement un workflow (horaire, fichier, écran)
- Variable globale : Donnée partagée entre workflows d'une même exécution
- Condition visuelle : Évaluation basée sur la détection d'un élément à l'écran
- Compteur de boucle : Variable incrémentée à chaque itération d'une boucle
- Garde de sécurité : Limite maximale d'itérations pour éviter les boucles infinies
Requirements
Requirement 1
User Story: En tant qu'utilisateur, je veux chaîner plusieurs workflows ensemble, afin de construire des processus complexes à partir de blocs simples.
Acceptance Criteria
- WHEN a workflow reaches an end node with a chain configuration THEN the system SHALL automatically start the specified next workflow
- WHEN chaining workflows THEN the system SHALL pass context variables from the ending workflow to the starting workflow
- WHEN a chained workflow fails THEN the system SHALL provide options to retry, skip, or abort the entire chain
- WHEN defining a chain THEN the system SHALL validate that the end state of workflow A is compatible with the entry state of workflow B
- WHEN executing a chain THEN the system SHALL maintain a unified execution log across all chained workflows
- WHEN serializing a workflow chain THEN the system SHALL preserve chain configuration and deserialize it correctly
Requirement 2
User Story: En tant qu'utilisateur, je veux créer des sous-workflows réutilisables, afin d'éviter de dupliquer des séquences communes comme la connexion ou la navigation.
Acceptance Criteria
- WHEN a workflow contains a reference node THEN the system SHALL execute the referenced sub-workflow at that point
- WHEN a sub-workflow completes THEN the system SHALL return control to the calling workflow at the next node
- WHEN a sub-workflow is modified THEN the system SHALL automatically update all workflows that reference it
- WHEN creating a sub-workflow THEN the system SHALL allow defining input parameters and output values
- WHEN a sub-workflow fails THEN the system SHALL propagate the error to the parent workflow with full context
- WHEN serializing a workflow with sub-workflow references THEN the system SHALL preserve reference configurations and deserialize them correctly
Requirement 3
User Story: En tant qu'utilisateur, je veux que le système détecte et fusionne les workflows similaires, afin de réduire la redondance et améliorer la maintenabilité.
Acceptance Criteria
- WHEN two workflows share nodes with similarity above 0.9 THEN the system SHALL suggest merging them
- WHEN merging workflows THEN the system SHALL preserve all unique paths from both workflows
- WHEN merging workflows THEN the system SHALL combine statistics and learning data from both sources
- WHEN a merge is proposed THEN the system SHALL show a visual diff of the changes before applying
- WHEN merged workflows have conflicting actions on the same node THEN the system SHALL prompt the user to resolve the conflict
Requirement 4
User Story: En tant qu'utilisateur, je veux extraire automatiquement les séquences communes en sous-workflows, afin de garder mes workflows DRY (Don't Repeat Yourself).
Acceptance Criteria
- WHEN the system detects identical sequences in multiple workflows THEN the system SHALL suggest extracting them as a sub-workflow
- WHEN extracting a sub-workflow THEN the system SHALL replace the original sequences with reference nodes
- WHEN a sequence appears in 3 or more workflows THEN the system SHALL flag it as a high-priority extraction candidate
- WHEN extracting THEN the system SHALL preserve the original workflows as backups until the user confirms
Requirement 5
User Story: En tant qu'utilisateur, je veux gérer les dépendances entre workflows, afin de comprendre et maintenir les relations entre mes workflows.
Acceptance Criteria
- WHEN viewing a workflow THEN the system SHALL display its dependencies (sub-workflows it calls) and dependents (workflows that call it)
- WHEN deleting a sub-workflow THEN the system SHALL warn about all workflows that depend on it
- WHEN a circular dependency is detected THEN the system SHALL prevent the configuration and display an error
- WHEN listing workflows THEN the system SHALL show dependency count and usage statistics
Requirement 6
User Story: En tant qu'utilisateur, je veux créer des boucles dans mes workflows, afin de répéter des actions jusqu'à atteindre un objectif.
Acceptance Criteria
- WHEN defining a loop node THEN the system SHALL allow specifying a fixed iteration count or a visual condition for termination
- WHEN a loop iteration completes THEN the system SHALL increment the loop counter and evaluate the exit condition
- WHEN a loop reaches its maximum iteration limit THEN the system SHALL exit the loop and continue to the next node
- WHEN a loop condition is based on visual detection THEN the system SHALL capture and analyze the screen at each iteration
- WHEN a loop exceeds the safety guard limit of 1000 iterations THEN the system SHALL terminate the loop and log a warning
- WHEN serializing a workflow with loops THEN the system SHALL preserve loop configuration and deserialize it correctly
Requirement 7
User Story: En tant qu'utilisateur, je veux créer des branchements conditionnels, afin d'adapter le comportement du workflow selon l'état de l'écran.
Acceptance Criteria
- WHEN defining a conditional node THEN the system SHALL allow specifying multiple branches with visual conditions
- WHEN evaluating a conditional node THEN the system SHALL test each branch condition in order and execute the first matching branch
- WHEN no branch condition matches THEN the system SHALL execute the default branch or raise an error if none is defined
- WHEN a condition is based on element presence THEN the system SHALL use the visual matching engine to detect the element
- WHEN a condition is based on element text THEN the system SHALL use OCR to extract and compare the text value
- WHEN serializing a workflow with conditions THEN the system SHALL preserve all branch configurations and deserialize them correctly
Requirement 8
User Story: En tant qu'utilisateur, je veux configurer des déclencheurs automatiques, afin que mes workflows s'exécutent sans intervention manuelle.
Acceptance Criteria
- WHEN defining a schedule trigger THEN the system SHALL allow specifying cron expressions or time intervals
- WHEN defining a file trigger THEN the system SHALL monitor a directory and start the workflow when a matching file appears
- WHEN defining a visual trigger THEN the system SHALL periodically capture the screen and start the workflow when a target element is detected
- WHEN a trigger fires THEN the system SHALL pass trigger context (timestamp, file path, or detected element) to the workflow
- WHEN multiple triggers are configured for the same workflow THEN the system SHALL handle concurrent executions or queue them based on configuration
- WHEN serializing trigger configurations THEN the system SHALL preserve all settings and deserialize them correctly
Requirement 9
User Story: En tant qu'utilisateur, je veux gérer des variables globales entre workflows, afin de partager des données dans une chaîne d'exécution.
Acceptance Criteria
- WHEN a workflow sets a global variable THEN the system SHALL make it available to all subsequent workflows in the chain
- WHEN a workflow reads a global variable THEN the system SHALL return the current value or a default if not set
- WHEN a workflow chain completes THEN the system SHALL preserve the final variable state in the execution log
- WHEN serializing execution context THEN the system SHALL include all global variables and deserialize them correctly
- WHEN a variable name conflict occurs between workflows THEN the system SHALL use the most recent value and log the override