Project 8 — Advanced
REFramework Production Bot (Orchestrator ke saath)
Ab tak ke projects development stage ke the. Enterprise me bot ko 24x7 production me chalna hai — queues, retries, alerts, monitoring ke saath. Is project me REFramework (Robotic Enterprise Framework) samjhenge aur ek production-grade bot banayenge. Ye RPA developer ki highest-value skill hai.
REFramework kya hai?
WHAT
UiPath ka official blueprint jo production bot ko ek state machine me organize karta hai — Initialization → Get Transaction Data → Process Transaction → Reconciliation. Queues, assets, retries, exception handling sab framework me built-in. Enterprise bots isi structure me bante hain.
WHEN
Jab bot production me jaye — 24x7 runs, multiple robots, business users ko alerts chahiye. Demo/POC me simple sequences chalte hain, real deployment me REFramework mandatory hai (client requirement hoti hai).
WHERE
Har enterprise RPA project — banking, insurance, healthcare, telecom. Job descriptions me "REFramework experience" likha hota hai. Isko samajhne se senior RPA developer bante ho.
4 states ka architecture
REFramework State Machine:
INITIALIZATION
+-- InitAllSettings (Config.xlsx read -> Settings dict)
+-- Init queues, assets, directories
+-- Get Transaction Data
|
v
GET TRANSACTION DATA
+-- Get Transaction Item (Orchestrator queue se next item)
+-- TransactionItem = Nothing? -> go RECONCILIATION (queue khaali)
+-- TransactionItem mila? -> PROCESS TRANSACTION
|
v
PROCESS TRANSACTION
+-- Try Catch
| +-- Process.xaml invoke (asli kaam - item process)
| +-- Set Transaction Status: Successful
| +-- (retries available? agar business exception aaya)
+-- Catch (Business Exception)
| +-- Set Transaction Status: Failed / BusinessException
| +-- (data galat hai - retry ka fayda nahi)
+-- Catch (System Exception)
| +-- retry count check
| +-- Set Transaction Status: Failed (auto-retry by Orchestrator)
+-- (loop back to GET TRANSACTION DATA)
|
v
RECONCILIATION
+-- InitAllSettings again, cleanup
+-- End Process (bot band)
Config.xlsx — bot ka brain
Config.xlsx sheets:
Settings sheet:
Key Value
RETRIES_NUMBER 3
SCREENSHOTS_PATH C:\Screenshots\
EXCEPTION_SCREENSHOTS_FOLDER C:\Screenshots\Exceptions\
QUEUE_FOLDER_NAME Finance
MAX_RETRIES 3
Assets sheet (Orchestrator asset mapping):
AssetName AssetType
Credential_DB Credential
CRM_ClientId Text
SMTP_Password Credential
Queues sheet:
QueueName REF_Invoice_Processing
# InitAllSettings ye sab load karta hai - code me ek bhi hardcode nahi
Process.xaml me asli kaam
Process.xaml (In/Out Arguments: in_TransactionItem, out_ok)
+-- Try Catch
| +-- Assign: strData = in_TransactionItem.SpecificContent("InvoiceJson")
| +-- Sequence: Parse + Validate
| | +-- Deserialize JSON -> dtInvoice
| | +-- If dtInvoice.Total <= 0 -> Throw "Invalid total" (Business)
| +-- Sequence: Execute
| | +-- HTTP Request / Excel write / DB insert (asli processing)
| +-- Catch (Business Exception)
| | -> Throw (data issue, framework Failed/BusinessException me mark karega)
| +-- Catch (System Exception)
| -> Take Screenshot SCREENSHOTS_PATH
| -> Rethrow (framework retry count check karega)
Business vs System exception — interview ka favourite
Business Exception = DATA galat hai
- Invoice total 0 hai, email format invalid, mandatory field missing
- Retry se fayda nahi -> Failed (BusinessException), manual queue me jaata hai
- Set Transaction Status: Failed / BusinessException
System Exception = ENVIRONMENT ka issue
- Network down, API 500, DB locked, file missing
- Retry se theek ho sakta hai -> Orchestrator auto-retries (RETRIES_NUMBER)
- Screenshot log karo, Rethrow
# Rule of thumb: "Kya dobara same item try karne se theek hoga?"
# Haan -> System. Nahi -> Business.
Orchestrator operations
- Queues: Dispatcher bot items daalta hai, Performer bot leta hai — scale independent. 1 dispatcher → 10 performers.
- Assets: credentials, paths, config values — bot redeploy bina change.
- Triggers: time-based + event-based (file trigger). Trigger bot = queue pe item aaye to automatically start.
- Monitoring: Orchestrator dashboard — running jobs, failed transactions, queue depth. Alerts configure karo (job fail → email/Slack).
- Folders: environment separation — DEV/QAS/PRD folders. Prod bot ko QAS queue kabhi na dikhe.
Exercise
Question: Orchestrator queue se next transaction item laane wali activity? (3 words)
Question: Data galat hone par (invoice total 0) kaunsa exception maara jaata hai? (2 words)
Common mistakes
- Har exception ko same treat karna: Business aur System exception ka farq samjho — warna retries bekaar ya data loss.
- Hardcoded config: RETRIES_NUMBER code me likha = production tuning ke liye redeploy. Config.xlsx.
- No screenshots: System exception pe screenshot na lena = baad me "kya hua" pata nahi. Screenshot + log mandatory.
- Transaction me cleanup skip: Process ke end me temp files/cookies clear karo — warna next transaction pe pollution.
- DEV config on PRD: Folder separation (DEV/QAS/PRD) bina production run = disaster. Orchestrator folders use karo.
Course complete! 8 real automation projects tumhare portfolio me. Ab inhe apne resume me daalo aur RPA interviews start karo.