0% found this document useful (0 votes)
24 views49 pages

Modul 6 Debugging Error Handling

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views49 pages

Modul 6 Debugging Error Handling

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Kominfo Profesional

Academy

Trainer Kelas 6
Tsabita Al Asshifa Hadikusuma
Kris Sujatmoko
Lead Instructor UiPath Academic Alliance
T.081322880881
Modul 6:
Debugging & Error Handling
Debugging a
Workflow
• Automation debugging
• Troubleshoot, Debug, and Modify processes
• Debugging actions
• Setting breakpoints
• Logging
• Logging levels
• How to do logging?
Automation Debugging
Debugging is the process of identifying and removing the errors which prevent the project from
functioning correctly. In UiPath Studio, debugging is

Useful for verifying the data


that each activity gets Done at activity, file,
during execution and project level

Done using options available in


the Debug Ribbon

Used for finding and locating


problems easily in complex
workflows
Troubleshoot,
Debug, and Modify processes
The Debug tool in UiPath Studio is a real-time engine that checks for errors while working with
the workflow. Whenever an activity has errors, UiPath Studio Process Designer notifies and gives details
about the issues encountered.

Debug File: Starts the debugging process


• Run File: Runs current file
• Debug: Debugs project
• Run: Runs project
Debugging Actions
The actions for debugging are:

Step Into Retry Break


Debugs activities step-by-step Re-executes previous activity Pauses the debugging process

Step Over Ignore Focus


Debugs the next activity without Ignores an exception and executes Returns to the activity that caused
opening it from the next activity error and resumes debugging

Step Out Restart Slow Step


Pauses execution at current container Restarts debugging from the first Debugging at a slower rate, takes a
activity of the project closer look at the activity
Debugging Actions (Contd.)
The actions for debugging are:

Execution Trail Log Activities Picture in Picture


Shows the exact execution path at Displays debugged activities as Trace Starts the process in a separate
debugging logs in the Output panel session

Highlight Elements Continue on Exception Open Logs


Highlights UI elements during Logs the exception in the Output panel Opens local folder where the logs are
debugging and continues the execution stored
Setting Breakpoints

Breakpoints
• Used when the user wants to pause the debugging process at a
specific activity that might be causing execution issue
• Used to check the state of a project at a given point
Logging
Logging is the process of keeping logs of various events that occur during project execution. There are
three types of logs:

Studio Logs
Robot Execution Logs
• Diagnostic log messages generated by Studio
regarding its behavior

Robot Logs
• Diagnostic log messages providing information
related to the Robot and its context
Generated by default Generated according to
Default when the execution of a
User- the process designed by
Logs project starts and ends Defined the user in Studio
Orchestrator Logs Logs
• Diagnostic log messages generated by
Orchestrator regarding its behavior
Logging Levels
There are six levels of logging:

Verbose
Critical Level Error Level Warning Level Information Level Trace Level
Level
Indicates critical Indicates errors Indicates events To know the To collect To log message at
issues wherein a after which a that may have an progress of a information for activity start and
robot may not robot retries for adverse impact on a robot at each developing or end, plus values of
recover and stop recovery and robot’s performance stage of debugging the variables and
working moves on execution arguments
How to do logging?
Logs are applied using the Log Message activity.

1 3
Fatal (Critical) Log Message Warn Log Message

2 4
Error Log Message Info Log Message

Log Message Activity

5 Trace Log Message


Classroom Exercise
Demonstrate how to use Log Message activity of
Info, Error, and Fatal level in a workflow by
creating a bank transaction process that logs the
responses and actions of the user.

• Display a message to the user, showing the available balance in his bank
account and log this action at Info level.
• Ask the user to enter the amount he wants to withdraw and log the response
at Info level.
• If the requested amount is greater than the available amount, then
• Log an error message, “User does not have enough amount”.
• Display a message to the user, “You are trying to withdraw more than
the allowed amount.”
• Log a fatal error message, “Invalid amount entered. Process
terminated.”, and terminate the process.
• If the requested amount is less than the available amount, then
• Display a message to the user, “Your remaining amount is $x”.
• Log an Info level message “Remaining amount displayed to the user”.
Error Handling
• Errors and Exceptions
• Error handling activities
• Global Exception Handler
Errors and Exceptions
Errors are events that hamper the regular execution of the program. Based on their source, there are
different types of errors:

Errors Exceptions
Errors are events that hamper Exceptions are a subset of
the regular execution of the errors that are recognized
program. Based on their (caught) by the program,
source, there are different categorized and handled.
types of errors: The two types of exceptions
• Syntax errors are:
• User errors • Application (System)
• Programming errors (bugs) Exception
• Business Exception
Error Handling Activities
Error handling is the mechanism for identifying and addressing the errors in a program. Some of the
important error handling activities are:

Error
Handling
Activities

Try Catch Retry Scope Throw Rethrow Terminate


Workflow
Error Handling Activities (Contd.)
Try Catch Retry Scope
Catches a specified exception type in a Retries the contained activities as long as the
sequence or activity, and either displays an condition is not met, or an error is thrown.
error notification or dismisses it and continues
the execution.
Error Handling Activities (Contd.)

Throw Rethrow
Throws a user-defined exception Takes an existing exception that has been
encountered and regenerates it at a higher
level
Error Handling Activities (Contd.)
Terminate Workflow
Terminates the workflow when the
task encounters an error
Global Exception Handler
The Global Exception Handler is a type of workflow designed to determine the behavior when
encountering an execution error at the project level.

• Only one Global Exception Handler can be set per


automation project.

• errorInfo and result arguments are integral to Global


Exception Handler and should not be removed.

• It identifies exceptions that are less likely to happen in a


certain part of a project.
Classroom Exercise
Demonstrate how to handle error using Try
Catch, Throw, and Rethrow activities in a
workflow.

• Use Try Catch activity to resolve errors of a


workflow.
• Use Rethrow activity within a Try Catch activity
to throw an error.
• Use Throw activity within an If activity to display
a user-defined error.
Picture in Picture
• Introduction to Picture in Picture
• Starting Picture in Picture
Picture in Picture
Picture in Picture allows to run a process in an isolated Windows session, thus allowing to use
the machine while the process is running.
Starting Picture in Picture
Use Debug tab in UiPath Studio or Contextual Menu in UiPath Assistant to start a process in Picture in
Picture mode

Debug tab
1. Activate Picture in
Picture mode
2. Run the process

UiPath Assistant
1. Open Context Menu
of a process
2. Click Start in PiP
Best Practices
• Best practices to build a project
Best practices
The best practices for building a good project are:

Analyze the process thoroughly, identify the requirements and plan accordingly

Break the process into smaller workflows for a better understanding of the code, independent testing, and reusability

Group the workflows of the project into different folders based on the target application

Keep consistent naming convention across the project

Pick an appropriate layout for each workflow (sequence/flowchart/state machine)

Use libraries for creating and storing reusable components for the projects

Use logs in production to get relevant information regarding critical moments, or when specific data is needed
Pengantar Debugging Otomasi
• Debugging Otomasi
• Aktivitas Debugging
• Panel Debugging
• Masalah otomatisasi umum
Debugging Otomasi
Proses mengidentifikasi dan menghapus kesalahan yang mencegah proyek berfungsi dengan benar.
Di Studio, debugging adalah

Berguna untuk
memverifikasi data yang Dilakukan pada
didapat setiap aktivitas tingkat aktivitas,
selama eksekusi file, & proyek

Dilakukan dengan
menggunakan opsi yang
tersedia di Ribbon
Debug Digunakan untuk menemukan
& menemukan masalah
dengan mudah dalam alur
kerja yang kompleks
Aktivitas Debugging
Aktivitas untuk debugging adalah:

• File Debug • Melangkah • Coba lagi • Breakpoints • Aktivitas Log


• Berhenti ke dalam • Abaikan • Langkah Lambat • Lanjutkan pada
• Langkahi • Mulai • Jejak Eksekusi Pengecualian
• Langkah ulang • Elemen Sorotan • Gambar dalam
Keluar • Fokus Gambar
• Buka Log
Aktivitas Debugging (Lanjutan.)

File Debug Langkahi


1 Memulai proses debugging
4 Debug aktivitas berikutnya tanpa
membukanya

Berhenti Langkah Keluar


2 Menghentikan proses debugging
5 Jeda eksekusi pada kontainer
saat ini, bekerja dengan sekuens
bersarang

Melangkah ke dalam Coba lagi


3 Debug aktivitas langkah demi 6 Mengeksekusi ulang aktivitas
langkah sebelumnya
Aktivitas Debugging (Lanjutan.)

Abaikan Istirahat
7 Abaikan pengecualian & eksekusi 10 Jeda debugging, aktivitas tetap
disorot, gunakan Continue untuk
dari aktivitas berikutnya untuk
men-debug alur kerja melanjutkan debugging

Mulai ulang Langkah Lambat


8 Mulai ulang debugging dari
aktivitas pertama proyek
11 Debugging pada tingkat yang
lebih lambat, lihat lebih dekat
pada aktivitas

Fokus Jejak Eksekusi


9 Kembali ke aktivitas yang
menyebabkan kesalahan &
12 Menunjukkan jalur eksekusi yang
tepat pada debugging
melanjutkan debugging
Aktivitas Debugging (Lanjutan.)

Elemen Sorotan Gambar dalam Gambar


Sorot elemen UI selama Mengeksekusi dan men-debug
13 debugging 16 proses atau pustaka dalam sesi
terpisah

Aktivitas Log Buka Log


Menampilkan aktivitas yang di- Buka folder lokal tempat log
14 debug sebagai Trace log di panel 17 disimpan
Output

Lanjutkan pada Pengecualian


Pengecualian dicatat di panel
15 Output dan eksekusi berlanjut
Mengatur Breakpoints

Breakpoints
• Digunakan ketika pengguna ingin menghentikan sementara proses debugging pada aktivitas
tertentu (yang menyebabkan masalah eksekusi)
• Pengguna mengidentifikasi & mengoreksi kesalahan
• Melanjutkan
Panel Debugging
Berbagai panel untuk debugging adalah:

01 02 03 04 05

Panel Penduduk Panel Panel Panel Pengamat Panel Langsung


Lokal Tumpukan Breakpoints
Panggilan
Panel Penduduk Lokal

Panel Penduduk
Setempat
• Menampilkan properti
atau aktivitas & variabel &
argumen yang ditentukan
pengguna
• Hanya terlihat saat
debugging
Panel Tumpukan Panggilan

Panel Tumpukan Panggilan


• Menampilkan aktivitas berikutnya
yang akan dieksekusi
• Aktivitas dengan pengecualian
yang disorot dengan warna
merah dan ditandai di panel ini
Panel Breakpoints

Panel Breakpoints
• Breakpoints menjeda debugging
pada aktivitas yang
menyebabkan masalah eksekusi
• Menampilkan semua breakpoint
dalam proyek saat ini
• Pengaturan Breakpoint:
disesuaikan secara individual
untuk setiap bagian breakpoint
yang diaktifkan
• Kondisi
• Hit Count
• Pesan Log
Panel Pengamat

Panel Pengamat
• Menampilkan nilai variabel,
argumen, ekspresi yang
ditentukan pengguna dalam
ruang lingkup
• Hanya terlihat saat debugging
Panel Langsung

Panel Langsung
• Digunakan untuk memeriksa
data
• Mengevaluasi variabel,
argumen, pernyataan
• Hanya terlihat saat debugging
Masalah Otomasi Umum
Beberapa masalah umum yang terjadi dalam proses otomatisasi adalah:

Elemen tidak Masalah Waktu


ditemukan
Latihan di Kelas

Ikhtisar panel Debug dan teknik debugging yang


berbeda-beda.
Panduan Aktivitas
• Panduan Aktivitas UiPath
Panduan Aktivitas UiPath

Sistem Otomasi UI Citrix Kognitif

Berisi semua aktivitas dasar Berisi semua aktivitas dasar Memungkinkan pengguna Berisi aktivitas yang
yang digunakan untuk yang digunakan untuk untuk dengan mudah membantu pengguna untuk
membuat proyek otomasi & membuat proyek otomasi & mengotomatisasi proses menggunakan API Google,
memungkinkan robot untuk: memungkinkan robot untuk: untuk manajemen & IBM, Stanford, dan Microsoft
• Memanipulasi tabel data • Mensimulasikan interaksi pemeliharaan mesin virtual & memungkinkan robot
• Berinteraksi langsung manusia Citrix sesuai permintaan untuk:
dengan direktori & file • Melakukan otomatisasi melalui hal-hal berikut: • Menerjemahkan teks dari
gambar & teks • Server baru dari templat satu bahasa ke bahasa
• Membuat pemicu berbasis • Opsi untuk mengambil lain
perilaku UI Screenshot mesin virtual • Mengekstrak informasi
• Melakukan interaksi • Mulai ulang, yang relevan dari sepotong
peramban nyalakan/mematikan daya teks yang diberikan
Panduan Aktivitas UiPath

Kredensial Excel Form Email

Berisi aktivitas yang bekerja Berisi kegiatan yang Berisi aktivitas yang Berisi aktivitas yang
dengan Windows Credential membantu pengguna untuk memungkinkan pengguna memfasilitasi otomatisasi
Manager & memungkinkan mengotomatisasi semua untuk: tugas-tugas yang
pengguna untuk: aspek Microsoft Excel & • Membuat formulir input berhubungan dengan surat &
• Menambah & menghapus memungkinkan pengguna khusus (untuk memungkinkan pengguna
kredensial untuk paket untuk: mengumpulkan data dari untuk:
autentikasi Microsoft • Membaca informasi dari pengguna manusia) • Kirim, terima, hapus email
tertentu sel, kolom, baris • Menampilkan pesan • Kirim lampiran
• Ambil kredensial • Menulis ke spreadsheet panggilan khusus
lain
• Mengeksekusi makro
• Mengurutkan data &
menambahkan informasi
tambahan
Panduan Aktivitas UiPath

PDF Terminal Web

Berisi aktivitas yang dirancang Berisi aktivitas yang dirancang Berisi aktivitas yang
untuk mengekstrak data dari file untuk terhubung ke terminal & memungkinkan pengguna untuk:
PDF & menyimpannya ke dalam bekerja secara efisien di • Melakukan permintaan
variabel string & memungkinkan dalamnya & memungkinkan
menggunakan protokol tertentu
pengguna untuk:
pengguna untuk: ke API web apa pun yang
• Mengambil teks, bidang
• Mengekstrak data dari seluruh mendukungnya
• Posisi layar, tombol kirim, teks
dokumen atau rentang • Tunggu teks atau bidang • Memanipulasi file XML dan
halaman (properti Range) tertentu muncul sebagai JSON
• Gunakan aktivitas berbasis pemicu • Mengotomatiskan berbagai
OCR untuk mengekstrak data • Terhubung ke lingkungan komponen perangkat lunak
dari dokumen yang dipindai tertentu menggunakan aktivitas dengan sedikit usaha
Terminal Session
(menggunakan API)
Panduan Aktivitas UiPath

Abbyy Kriptografi Basis Data Server Pertukaran FTP


Memungkinkan pengguna Menyediakan layanan Memungkinkan pengguna Termasuk aktivitas yang Memungkinkan pengguna
untuk mengekstrak data enkripsi kepada pengguna untuk terhubung ke dirancang untuk Microsoft untuk terhubung ke server
cerdas & proses untuk mengenkripsi & database & melakukan Exchange Server 2016 & File Transfer Protocol &
pengambilan dokumen mendekripsi data sensitif tindakan seperti 2019 (surat, kalender, melakukan seperti
melalui OCR, Cloud OCR, menggunakan protokol mengeksekusi transaksi jadwal, dll.) mencari, mengunduh,
aktivitas ekstraksi data enkripsi atau query & non query mengunggah file &
direktori
Panduan Aktivitas UiPath

Google GSuite OCR Cerdas Pemrosesan Java Kegigihan


Memungkinkan pengguna Memungkinkan pengguna Dokumen Memungkinkan pengguna Memungkinkan pengguna
untuk mengotomatisasi untuk mendigitalkan & Memungkinkan pengguna untuk memanfaatkan untuk memanipulasi
aplikasi Google Cloud G mengklasifikasikan untuk mengintegrasikan kekuatan kode Java pekerjaan, tugas, antrian di
Suite (Kalender, Drive, dokumen, mengekstrak aktivitas klasifikasi & dengan menginisialisasi Orchestrator
Mail, dll.) data & mengekspornya ekstraksi sendiri dengan pustaka Java &
paket aktivitas OCR menggunakan aktivitas
Cerdas lebih lanjut
Panduan Aktivitas UiPath

Python Sales Force SAP BAPI OCR Layar Landasan Alur Kerja
Memungkinkan pengguna Memungkinkan pengguna Memungkinkan pengguna Menawarkan OCR berbasis Menyediakan
untuk memanggil skrip & untuk mengotomatisasi untuk terhubung ke sistem pembelajaran mesin untuk fungsionalitas untuk aliran
metode Python dalam alur proses Salesforce SAP & menggunakan layar kontrol, penanganan
kerja apa pun langsung dari (manipulasi file & catatan, aktivitas Invoke SAP BAPI peristiwa, & berkomunikasi
UiPath eksekusi laporan) dengan aplikasi dan
layanan
Panduan Aktivitas UiPath

Layanan Domain VMware Layanan ML Omni Page OCR Word Visi Microsoft
Direktori Aktif

Layanan Web Aktivitas Azure Pemahaman Microsoft Direktori Aktif Azure Google Vision
Amazon Dokumen ML Dynamics 365
Ringkasan

01 Tentang UiPath & produk-


produknya
02 Robot & jenisnya

03 Tinjauan Studio

04 Instalasi & Pembaruan UiPath Studio

05 Antarmuka
Pengguna Studio
06 Fitur Studio

06 Membangun Proyek Otomatisasi 'Hello


World'

You might also like