- Démarrage
- Paramétrage et configuration
- Prérequis logiciels et matériels
- À propos des licences à tarification unifiée
- À propos des licences Flex
- Activation de Studio
- Mettre à jour Studio
- Paramètres de la ligne de commande
- Applications et technologies prises en charge
- Activer Gmail pour les activités de messagerie
- Refus de la télémétrie
- Exécutables Studio
- Projets d'automatisation
- À propos de la publication de projets d'automatisation
- Conception d'automatisations
- Gérer les package d’activités
- Configuration des paramètres du projet d'activité
- Signature de paquets
- Gouvernance
- Import des entités
- Lier un projet à une idée dans Automation Hub
- Utilisation du gestionnaire de données
- Solutions
- Dépendances
- Types de workflows
- Flux de contrôle
- Comparaison de fichiers
- Meilleures pratiques d'automatisation
- Intégration du contrôle de code source
- À propos du contrôle de version
- Gestion de projets à l'aide de TFS
- Gestion de projets à l'aide de SVN
- Diff de workflow
- Le panneau de contrôle de code source
- Débogage
- Journalisation
- L'outil de diagnostic (Diagnostic Tool)
- Analyseur de workflow
- À propos de l'analyseur de workflow
- ST-NMG-001 - Convention d'affectation de noms des variables
- ST-NMG-002 - Convention d'affectation de noms des arguments
- ST-NMG-004 - Duplication du nom complet
- ST-NMG-005 - La variable remplace une autre
- ST-NMG-006 - La variable remplace l'argument
- ST-NMG-008 - Longueur de variable dépassée
- ST-NMG-009 - Ajouter un préfixe aux variables DataTable
- ST-NMG-011 - Ajouter un préfixe aux arguments Datatable
- ST-NMG-012 - Valeurs par défaut de l'argument
- ST-NMG-016 : longueur d'argument dépassée
- ST-NMG-017 : le nom de la classe correspond à l’espace de noms par défaut
- ST-DBP-002 - Nombre élevé d'arguments
- ST-DBP-003 - Bloc d'interception vide
- ST-DBP-007 - Plusieurs couches de l'organigramme
- ST-DPB-010 : plusieurs instances de [workflow] ou [cas de test]
- ST-DBP-020 - Propriétés de sortie non définies
- ST-DBP-021 - Délai d'expiration codé en dur
- ST-DBP-023 : Workflow vide
- ST-DBP-024 - Vérification de l’activité de persistance
- ST-DBP-025 - Condition préalable à la sérialisation des variables
- ST-DBP-027 - Pratiques exemplaires de persistance
- ST-DBP-028 - Condition préalable à la sérialisation des arguments
- ST-MRD-002 - Valeurs par défaut des noms d'activités
- ST-MRD-004 - Activités inaccessibles
- ST-MRD-005 - Séquences redondantes
- ST-MRD-007 - Clauses If imbriquées
- ST-MRD-008 - Séquence vide
- ST-MRD-009 - Activités profondément imbriquées
- ST-MRD-011 - Utilisation de la ligne d'écriture
- ST-MRD-017 - Incomplet si (Incomplete If)
- ST-USG-005 - Propriétés de l'activité codées en dur
- ST-USG-009 - Variables inutilisées
- ST-USG-010 - Dépendances inutilisées
- ST-USG-014 - Restrictions sur les paquets (Package Restriction)
- ST-USG-017 - Modificateur de paramètre non valide
- ST-USG-020 - Nombre minimum de messages consignés
- ST-USG-024 - Non utilisé, sauvegardé pour plus tard (Unused Saved for Later)
- ST-USG-025 - Utilisation abusive de la valeur enregistrée (Saved Value Misuse)
- ST-USG-026 - Restrictions d'activité (Activity Restrictions)
- ST-USG-027 - Packages requis
- ST-USG-028 - Restreindre l'invocation des modèles de fichier
- ST-USG-027 - Balises requises
- ST-USG-034 – URL Automation Hub
- Variables
- Arguments
- Noms d'espace importés
- Automatisations codées
- Introduction
- Enregistrement de services personnalisés
- Contextes Avant (Before) et Après (After)
- Génération du code
- Génération de cas de test codé à partir de cas de test manuels
- Writing canvas-friendly coded workflows
- Intégration d'OpenAI avec des workflows codés
- Demander un prêt auprès de UiBank
- Génération de files d'attente avec workflows codés et API Orchestrator
- Utilisation de projets de bibliothèque importés dans des automatisations codées
- Utilisation de l’authentification à deux facteurs dans des automatisations codées
- Connexion à MongoDB Atlas avec des automatisations codées
- Résolution des problèmes
- Automatisation Attended basée sur déclencheur
- Réf. d’objets
- Outil ScreenScrapeJavaSupport
- Extensions
- À propos des extensions
- Outil SetupExtensions
- UiPathRemoteRuntime.exe n'est pas en cours d'exécution dans la session distante
- UiPath Remote Runtime bloque la fermeture de la session Citrix
- UiPath Remote Runtime provoque une fuite de mémoire
- Le package UiPath.UIAutomation.Activities ne correspond pas aux versions d’UiPath Remote Runtime
- L'extension UiPath requise n'est pas installée sur la machine distante
- Paramètres de résolution d’écran
- Stratégies de groupe
- Impossible de communiquer avec le navigateur
- L’extension Chrome est automatiquement supprimée
- L'extension a peut-être été corrompue
- Vérification de l'installation et de l'activation de l'extension pour Chrome
- Vérifiez si ChromeNativeMessaging.exe est en cours d’exécution
- Vérifier si la variable ComSpec est correctement définie
- Activez l’accès aux URL de fichiers et au mode navigation privée
- Profils de navigateur multiples
- Group Policy conflict
- Problèmes connus spécifiques aux extensions MV3
- Liste des extensions pour Chrome
- Extension Chrome sur Mac
- Stratégies de groupe
- Impossible de communiquer avec le navigateur
- L’extension Edge est automatiquement supprimée
- L'extension a peut-être été corrompue
- Vérification si l'extension pour Microsoft Edge est installée et activée
- Vérifiez si ChromeNativeMessaging.exe est en cours d’exécution
- Vérifier si la variable ComSpec est correctement définie
- Activation de l'accès aux URL de fichiers et au mode navigation privée
- Profils de navigateur multiples
- Group Policy conflict
- Problèmes connus spécifiques aux extensions MV3
- Liste des extensions pour Edge
- Extension pour Safari
- Extension pour Amazon WorkSpaces
- Plug-in du gestionnaire de solution SAP
- Complément Excel
- Tests Studio
- Résolution des problèmes
- À propos de la résolution des problèmes
- Erreurs de compilation de l’assembly
- Prise en charge et limitations de Microsoft App-V
- Résolution des problèmes rencontrés avec Internet Explorer x64
- Problèmes rencontrés avec Microsoft Office
- Identification des éléments d'IU dans PDF avec options d'accessibilité
- Réparation de la prise en charge d'Active Accessibility
- La validation des projets volumineux hérités depuis Windows prend plus de temps que prévu
Recommendations for structuring coded workflows so the Low-Code Viewer renders them as clean, readable low-code diagrams.
A little structure goes a long way toward a clean canvas. The recommendations below help the Low-Code Viewer render your coded workflow as readable low-code blocks instead of opaque code blocks. They are ordered by impact, starting with the changes that matter most.
UiPath services over hand-rolled code
Calls to the project's services — system.AddQueueItem(...), excel.ReadRange(...), mail.SendSmtp(...), uiAutomation.Click(...) — render as rich activity cards: a friendly display name, the service icon, editable properties, and a typed output variable.
The same operation implemented from scratch — with HttpClient, System.IO, or a NuGet Excel library — renders at best as an Assign card holding one long expression, and at worst as a code block. Reaching for the activity packages first, and dropping to custom C# only where no activity covers the need, keeps more of the workflow visible.
// Renders as a "Write Range" activity card with editable properties:
excel.WriteRange("C:\\out.xlsx", "Sheet1", "A1", table);
// Renders as an opaque code block:
using var writer = new StreamWriter("C:\\out.csv");
// Renders as a "Write Range" activity card with editable properties:
excel.WriteRange("C:\\out.xlsx", "Sheet1", "A1", table);
// Renders as an opaque code block:
using var writer = new StreamWriter("C:\\out.csv");
The entry method as an orchestration layer
The Graph view draws only the entry method ([Workflow] or Execute). Every call to one of your own methods becomes a single labeled block, and selecting it drills into the helper.
Keeping the top-level branching, loops, and error handling in the entry method, and moving detailed step sequences into well-named private methods, makes the graph read as a clean, high-level flow — ValidateInvoice → PostToQueue → NotifyFinance — instead of a wall of low-level cards. Each helper also gets its own section in the Workflow view, so nothing is hidden. Intention-revealing names matter double here: the method name is the block label.
Control flow as statements, not expressions
The canvas can only draw branching and looping that exists at the statement level. Logic tucked inside expressions — lambdas, Language Integrated Query (LINQ) chains, nested ternaries, or switch expressions — is compressed into a single card, which defeats the purpose of the visualizer.
The switch distinction is worth noting: a switch statement renders fully, as a Switch container with one arm per case, while the expression form (var label = total switch { ... };) stays compressed inside a single Assign card. The statement form is the better choice when the branching is a process step a reader should see.
// Invisible logic — one code block, the filtering and branching are not drawn:
invoices.Where(i => i.Amount > 1000).ToList().ForEach(i => Approve(i));
// Visible logic — a loop containing a decision containing an Invoke block:
foreach (var invoice in invoices)
{
if (invoice.Amount > 1000)
{
Approve(invoice);
}
}
// Invisible logic — one code block, the filtering and branching are not drawn:
invoices.Where(i => i.Amount > 1000).ToList().ForEach(i => Approve(i));
// Visible logic — a loop containing a decision containing an Invoke block:
foreach (var invoice in invoices)
{
if (invoice.Amount > 1000)
{
Approve(invoice);
}
}
A LINQ one-liner is still fine when it is a simple projection whose detail you would happily hide (var names = rows.Select(r => r.Name).ToList(); renders as one Assign card). The rule of thumb: if a reader of the diagram should see the branching, write it as if, switch, or foreach.
Renderable equivalents for fallback constructs
Several common constructs fall back to code blocks. Each has a renderable equivalent that produces visible blocks instead.
| Instead of | Écrire | Because |
|---|---|---|
list.ForEach(x => ...) | foreach (var x in list) | The body becomes visible blocks |
| Local functions | Private methods | Private methods render as navigable Invoke blocks |
using var handle = excel.UseWorkbook(...); | using (var handle = excel.UseWorkbook(...)) { ... } | The block form renders as a scope frame, and lets calls on handle inside it resolve as activities |
int a = 1, b = 2; | One declaration per line | Each becomes its own Assign card |
string result; ... result = ...; later | A declaration with an initializer at first use | Bare declarations fall back to code blocks |
Inline variable declarations, one per statement
A declaration with an initializer renders as an Assign card (or as the output of an activity card) and feeds the per-method Variables panel. A bare declaration renders as a code block. Declaring each variable where its value is first produced keeps it visible.
var asset = system.GetAsset("Config"); // activity card, output: asset
int retryCount = 0; // Assign card, typed
var asset = system.GetAsset("Config"); // activity card, output: asset
int retryCount = 0; // Assign card, typed
Explicit types where the viewer cannot infer them
The canvas labels each output variable with the best type it can find:
- For recognized activity calls, the type comes from the package metadata automatically.
var asset = system.GetAsset(...)already displays the real return type, sovarcosts nothing there. - For everything else — plain assignments, calls to your own methods, and computed expressions —
vardisplays literally asvar. An explicit type puts the real type on the card and in the Variables panel.
var totals = ComputeTotals(rows); // Variables panel shows: totals : var
DataTable totals = ComputeTotals(rows); // Variables panel shows: totals : DataTable
var totals = ComputeTotals(rows); // Variables panel shows: totals : var
DataTable totals = ComputeTotals(rows); // Variables panel shows: totals : DataTable
Comments that describe intent
A // comment placed directly above an activity, method call, if, foreach, for, switch, try, return, or #region is attached to that block. It becomes the card's description in the Graph view, the row tooltip in the Workflow view, and the Description field in the properties panel. Consecutive comment lines are joined.
// High-value invoices need manual approval before posting
system.AddQueueItem("InvoiceApproval", reference: invoice.Id);
// High-value invoices need manual approval before posting
system.AddQueueItem("InvoiceApproval", reference: invoice.Id);
Comments that do not sit above such a statement render as their own small code rows, so one purposeful comment per step reads better than scattered commentary.
Process phases grouped with regions
#region Name ... #endregion renders as a named, collapsible group in both views, and regions can nest. When regions are named after business phases — Login, Process invoices, Reporting — a collapsed graph reads like a process summary, and expanding a region reveals its steps.
Related assignments grouped together
Two or more consecutive assignments fold into a single Multiple Assign card. Initializing related values in one uninterrupted run keeps them in one tidy card instead of scattering them across the flow. Conversely, an assignment that deserves its own card should stand apart from other assignments.
One call per statement
When calls are chained (row.GetValue("col").ToString().Trim()), the viewer can only surface the chain as a single row, and chains on unrecognized receivers fall back entirely. Splitting a meaningful chain into steps with named intermediate variables gives each step its own block. For handle APIs, such as Excel workbooks and mail folders, it also lets the viewer track the handle so follow-up calls render as proper activities.
Recognizable workflow invocations
workflows.MyOtherWorkflow(arg1, arg2)renders as a dedicated Invoke Workflow card, with each argument badged by direction (In, Out, or InOut) and navigation to the workflow file.SharedHelpers.Method(...)calls into another.csfile of the project render as navigable Invoke blocks. Keeping these as a single call per statement, rather than part of a longer chain, is what lets them resolve.
Quick checklist
- Steps use activity services (
system.,excel.,mail., and similar), not hand-rolled equivalents. - The
[Workflow]method is short and orchestrates well-named private methods. - Branching and looping are statements (
if,switch,foreach,for,while,try), with no logic hidden in lambdas or LINQ pipelines. - Variables are declared inline, one per statement, with an initializer.
- Explicit types are used where the viewer cannot infer one, such as helper-method results and computed values.
- A one-line
//comment sits above each significant step. - Process phases are wrapped in
#region. - Each statement holds one service or helper call, with no long chains.
- Other workflows are invoked through
workflows.X(...). - No grey Code block cards are left on the canvas — each one is a spot where the visual view went blind.
Contenu associé
- UiPath services over hand-rolled code
- The entry method as an orchestration layer
- Control flow as statements, not expressions
- Renderable equivalents for fallback constructs
- Inline variable declarations, one per statement
- Explicit types where the viewer cannot infer them
- Comments that describe intent
- Process phases grouped with regions
- Related assignments grouped together
- One call per statement
- Recognizable workflow invocations
- Quick checklist
- Contenu associé