Skip to content

Latest commit

 

History

History
374 lines (325 loc) · 21.5 KB

A2019.md

File metadata and controls

374 lines (325 loc) · 21.5 KB

A2019

Notes

  • To convert objects using inline commands, follow the similar syntax $var-name.Number:toString$ -> converting number to string

A 2019 Excel Commands

  1. Basic ~> The Excel basic package allows you to automate normal excel processes without installing Microsoft Excel on the device, it includes 11 commands

  2. Advanced ~> The Excel advanced package allows you to automate tasks related to the workbook,worksheets,rows,columns and cell operations, it includes approximately 50 actions and requires MS Excel installed on device

The Excel Advanced Commands are classified into:

  1. Workbook Operations

    • Append Workbook: Adds all the worksheets from the specified workbook to the end of the currently open workbook
    • Convert Excel to PDF: Converts the entire eworkbook, specific worksheets in a workbook , or a CSV file to a PDF file
    • Create Workbook: Creates a Microsoft Excel workbook or a CSV file
    • Protect Workbook: Protects the workbook and its structure using a password and can also unprotect a workbook and its structure
    • Save Workbook: Saves the current workbook
  2. Worksheet Operations

    • Access password protected worksheet: Accesses a password protected worksheet in the current workbook
    • Create worksheet: Creates a worksheet in the current workbook
    • Get current worksheet name: Gets the name of the current worksheet and assigns it to a string variable
    • Hide worksheet: Hides a worksheet from the current workbook
    • Retrieve sheets count: Gets the number of sheets available in the current workbook and stores it in a number variable
  3. Row/Column Operations

    • Hide rows/columns in selection: Hides rows or columns in the current worksheet
    • Insert/Delete Rows or Columns: Creates or removes rows or columns from the current worksheet or CSV file
    • Read column : Extract data from a column and stores it in a list variable of string data type
    • Remove blank rows: Removes blank rows from the current worksheet.You can specify the range from which you want to delete the blank rows
    • Select cells/rows/columns: Select cells,rows,or columns from the current worksheet
  4. Cell Operations

    • Get Single cell: Retrieves the values from a single cell in a Microsoft Excel Spreadsheet or a CSV file and stores them in a string variable
    • Go to cell: Moves the cursor to a specific cell in a Microsoft Excel spreadsheet or a CSV file
    • Go to next empty cell: Finds the next empty cell in the current worksheet.You can specify whether to find the empty cell toward the left,right,up,or down
    • Set cell: Sets a value in the Active cell or Specific cell in a Microsoft Excel spreadsheet or a CSV file.You can also use this action to set a formula
    • Set cell formula: Sets a formula in the active cell or a specific cell in a Microsoft Excel spreadsheet or a CSV file.
  5. Excel Table Operations

    • Insert table column: Inserts a column in table
    • Delete Table column: Deletes a column in a table
  6. Export to PDF

DataBase

  • To Connect your local-system MySQL to A2019, use Database:Connect
    1. Session Name: Anything you like
    2. Connection Mode: User defined
    3. Database type: MySQL
    4. Server: localhost
    5. Fill up database name,username,password
    6. Check on use specific database and give path to mysql-connector-java-8.0.21.jar file, generally found in C:\Program Files (x86)\MySQL\Connector J 8.0\ path
  • Database:Read from this activity is used to fetch data from table into A2019 system memory,basically it does not store the table data into any variable but you can access it using Loop activity
  • Database:Read from this activity can also be used to store any tabular data from database to csv file
  • Database: Export to data table as the name refers this activity is used to fetch data from database using SELECT query and stores it into a datatable variable
  • Insert/Update/Delete activity is used to insert/update/delete data or to execute queries like truncate/drop/alter etc
  • The queries works same as SQL with same input and output

Play Sound

  • It is a simple activity that is used to play sound
  • Play beep plays a simple windows sound
  • Play media file is used to play a .wav or .mp3 file

PGP

  • This activity is used for encryption-decryption of data to be send over network
  • PGP: Create keys activity is used to create Public and Private keys, remember to give their extension as .txt
  • The above generated Public key is used for file encryption using PGP: Encrypt files, in which a Source file path is given and an folder is created containing the encrypted file
  • The encryption can be done using different kinds of Encryption Algorithms such as:
    1. AES256
    2. AES128
    3. AES192
    4. Blowfish
    5. CAST5
    6. Idea
    7. TripleDes
    8. Twofish256
  • these are various algorithms which are used based on circumstance
  • The files Encrypted using above activity are Decrypted using PGP: Decrypt files which requires the PRIVATE KEY as input generated in pair with Public Key

Screen

  • Screen: Capture area activity is used to capture a screen shot of specific area from any window though it works perfectly only if Screen Resolution is set to 100%. (Brings application in forefront)
  • Screen: Capture desktop activity is used to take the screenshot, unlike the name this activity will take a complete screen clipping and save it in preferred location
  • Screen: Capture window activity is used to take the screenshot of any application/window and save it in preferred location. It is also set to take pic at resolution of 100% thus without this, the snapshot will not be much satisfactory

OCR

  • These activities can scrap any image based text as well as normal text from any web page
  • These should be used with Screen Resolution set to 100% for perfect results
  • OCR: Capture Window activity is used for ScreenScraping techinique. It is highly efficient to scrap any screen and convert it into a string format
  • It supports scrapping different languages like English, Japanese, Russian
  • OCR: Capture area activity is used scraping a particular area and converting to string format. It is really efficient
  • OCR: Capture image by path activity is used to get text from images stored in system/control room
  • OCR: Capture image by url works same as image by path, just that instead of downloaded image path you have to provide the url of the image
  • In OCR: Capture image by url activity the image url should refer the type of extension the image has such as https://www.automationanywhere.com/images/easyblog_articles/389/b2ap3_large_better-productivity-and-security.jpg

System

  • The System package contains most simple activities that are used to
    1. Lock Computer
    2. Logoff
    3. Restart
    4. Shutdown

MS Word

  • MS Word: Create MS Word Document activity is used to create word document with some text written in it(optional)
  • Input Paramers:
    1. FilePath -> Location where the file should be created
    2. FileName -> name of the file, extension will be docx by default, thus no need to mention
    3. Paragraph(optional) -> Content to initialize the document with
  • MS Word: Add Paragraph activity is used to add some new paragraph content or basically append more text to already existing file
  • MS Word: Insert Text activity

Word2Pdf

  • In A2019 by default there is no such activity for this particular task but it can be achieved easily and efficiently using Python integration
import sys
import os
import comtypes.client

def Word2Pdf(Files):
    wdFormatPDF = 17
    word = comtypes.client.CreateObject('Word.Application')
    doc = word.Documents.Open(Files[0].replace("/","//"))
    doc.SaveAs(Files[1].replace("/","//") ,FileFormat=wdFormatPDF)
    doc.Close()
    word.Quit()

XML

<?xml version="1.0"?>
<SOH>
<environment name="dev">
    <path1>Hello</path1>
    <path2>Hi</path2>
</environment>
<environment name="pro">
    <path1>Hello</path1>
    <path2>Hi</path2>
</environment>
</SOH>
  • XML Expression to access nodes through parent is like /SOH/environment/path2
  • Another way is using relative expression that is like //environment/path1
  • To get multiple nodes, one can //environment/path1

IQ Bot

  • When you trigger document classification using IQ Bot, Unsupervised learning technology comes into play

  • It can extract data from scanned/digital/image documents/ emails

  • Technologies used in IQ Bot are:

    1. Unsupervised Learning
    2. Fuzzy Logic
    3. Computer Vision
    4. Machine Learning
    5. Convolutional Neural Network
    6. Tesseract Fine Reader
    7. Key-Value / coordinate mapping (Auto-mapping)
    8. Point and Click
  • Flow of IQ Bot is like: Instance creation >> Document analysis >> Bot training >> Production processing >> Document validation >> progress monitoring

  • 5 Components of IQ Bot are:

    1. Dashboards -> progress and health of projects
    2. Learning Instances -> train bots
    3. Domains -> types of Learning instances
    4. Bot -> manage bots
    5. Administration -> export / import instances across servers
  • During document analysis phase, An IQ bot does the following tasks:

    1. Applying classifier
    2. Performing semantic analysis
    3. Learning from aliases
    4. Recognizing patterns
    5. Extracting data
    6. Group similar documents
  • Extracted data can be saved in CSV files

Instance

  • Created in staging:demo environment
  • Creating an Instance, follows:
    1. Reviewing document samples -> which fields are common and which are unique
    2. Filling in details -> type of document and fields required to fetch
    3. Uploading document samples -> documents to train the IQ Bot
    4. Adding field,table columns, or repeated sections -> If a field is a part of table, choose add as table/repeated section else Add as form
    5. Triggering instance creation and document analysis
  • When selecting and reviewing documents for data extraction, it is important to keep the following points in mind:
    1. Besides image formats, such as TIFF,JPG, and PNG files, you can also upload PDF,Vector,Raster and Hybrid(Vector and Raster) documents for classification and analysis
    2. You must use documents with a resolution value of atleast 300 Dots Per Inch (dpi)
    3. You can add additional documents even after creating the learning instance

Training Bot

  • Click on Edit Bot or Create Bot in the Actions Panel

  • Left Panel -> Displays the fields and table columns from the document that were defined during instance creation

  • Center Panel -> Allows label and value mapping for the fields and table columns

  • Right Panel -> Displays the document sample that was uploaded to the learning instance

  • System Identification Region (SIR) -> Optical Character Recognition (OCR) extracted value of a field/column (also called a text segment)

  • To check which value is being captured, hover over the value

  • To clear the mapping -> click on cross mark

  • To fetch value without Label, set the label name and value mapped to the value

  • To set alias in Field Label use | symbol such as Label1 | Label 2

  • If there are fields, which exist in one document but not in other, Go to Field options and choose optional

  • In field options,we can set the correct pattern for any field such as dd-mm-yyyy

  • View each Group document let you change the document form which the training can be done

  • For table data extraction, First open the Table/section settings and set the value of Best field for table/repeated section to the column name which:

    1. Should never contain null values
    2. Should not contain data records that may span multiple lines
  • To remove a column from a pre-defined table, create another table and move the column to new one

  • For table mapping, one should map the end of table for proper extraction

  • To extract data from number of checkboxes, set the data-type as checkbox group and select all the checkbox fields

  • Then capture the individual checkboxes and set the checkbox group to above selected field

  • Once all the errors are fixed a green tick is visibleon right-side of the Document name

Extract Repeated Table Sections

  1. Check the Table/section settings for best matched column
  2. Column Value should be matched to the column name itself with proper data type
  3. For the repeated section, select the column with all fields containg values
  4. To Link sections:
    • Go to the Table/Section settings of the table whose data you want to link
    • Go to Link tables/sections
    • Select the table and column to link the field with
    • All the tables will be matched
  5. To get data in csv for better verification, click on Export to CSV

Best Practices

  1. Adding Sections
  2. Making columns optional when needed
  3. Selecting an appropriate best field for repeated sections

IQ Bots in Production

  • To Send IQ Bots to Production
    1. Bots are required to be send into production by toggling actions tab
    2. Followed by sending the complete instance to production by toggling actions tab
  • As output to IQ Bots processing, 4 folders are created:
    1. Success Folder -> Successfully extracted comma-separated value (CSV) files
    2. Invalid Folder -> Files marked invalid through the Validator
    3. Not Processed Folder -> Files with layout that have not been trained
    4. Unclassified Folder -> Rejected files that contains missing fields or mismatched language

Document Validation and Monitoring Progress

  • Steps in this process:
    1. Launching the Validator
    2. Correcting field data
    3. Marking documents invalid
    4. Reviewing Output folder
  • To Launch validator : Go to learning instance and click on validator
  • Correct Values in the documents and save the documents, on each manual correction the IQ Bot will learn the problems and may processed the mistakes itself
  • If document can not be corrected manually, mark it as Invalid
  • After Validation, the saved documents will also be saved in the Success folder

Custom Logic

  • In the field settings, we can apply Python logics to interpret any field value
  • To access field value , use field_value
  • You can use multiple modules like pandas,numpy,API processing etc.

Macro Logic to Separate Form Field Data and Table Field Data

Sub IQBot(Col As String,FileName As String)
    Sheets(1).Name = "Table Data"
    Range("A1:" + Col + "2").Select
    Selection.Copy
    Sheets.Add After:=ActiveSheet
    ActiveSheet.Paste
    Sheets(2).Name = "Form Data"
    Sheets(1).Select
    Selection.EntireColumn.Delete
    ActiveWorkbook.SaveAs FileName,FileFormat:=51
    ActiveWorkbook.Close
End Sub

Quiz1

  1. Which IQ Bot portal component will you use to manage all your automation projects and to train bots? Learning Instances
  2. When correcting field data during document validation, the Validator gains 90% confidence and starts autocorrecting data. Which AI technology does it use to do this? Machine learning
  3. During bot training, which Artificial Intelligence technology does IQ Bot use to automatically fix erroneous values? Fuzzy logic
  4. You are creating a learning instance for single page purchase orders that are all available as separate PDF files. You want to add a non-standard field, Default G/L Date, which occurs once at the top of each purchase order. Which button will you click to include this field in the instance? Add as form
  5. Which web page will you use to move bots to Production? Bots page of the IQ Bot portal
  6. Which one of the following is TRUE about uploading document samples during learning instance creation? You can upload multiple document samples for classification.
  7. What percentage value does the Straight-through processing field in the My learning instances section of the Dashboard page indicate? Documents processed by all your learning instances without manual intervention
  8. Which one of the following folders will you review to check if there were any documents that could not find any trained bot for their layout? Not Processed
  9. You are training a bot on a sample bank statement. The statement has Transaction Date as the label of a table column, which has been mapped. What will you use to map the column values under this label? The label Transaction Date
  10. After creating a learning instance, you realize that you need to add another non-standard field to it. How best will you accomplish this? On the Instance details page, navigate to the Document Groups tab and then click the Edit bot icon.
  11. When performing batch processing on documents, you use the Each File In A Folder sub-command to automatically process each document in a folder. Which command will you access to use this sub-command? Loop
  12. After verifying and fixing bot training results, to further review the accuracy of the training, you can export the previewed data in which of the following formats? CSV
  13. Which application will you use to upload Production-ready documents to IQ Bot for processing? Automation Anywhere Enterprise Client
  14. When training a bot on a contract document, you realize that IQ Bot has incorrectly auto mapped the company name value. Which is the best way to correct this? Use the Draw feature to capture the correct value.
  15. On Automation Anywhere Enterprise Client, which command will you use to upload real-time documents to the learning instance in the IQ Bot portal? IQ Bot
  16. The document on which you are training your bot includes the label Gender with three radio buttons under it. What data type will you select when mapping this set of radio buttons? Checkbox group
  17. Which one of the following is a best practice for selecting the Best field for table/repeated section? A table column that will never contain null values
  18. Xptrexs, a logistics company, wants to use RPA with IQ Bot to automate processing the bills of lading it receives from its customers, each of whom use a different layout for the document. Identify the step that will exclusively be performed by IQ Bot. Extract data from the different bills
  19. When creating a learning instance for invoices, you have selected the standard document type, Invoices. What will you do next to add the standard form field, Invoice number, to the instance? Select the field name from the displayed fields.
  20. You are training a bot on a purchase order that has two address fields to be mapped: Ship To and Bill To. However, when the Ship To and Bill To addresses are the same, the Bill To field is blank. How will you indicate this during the bot training? You will mark the Bill To field as optional.

Quiz2

  1. What are REGEX commands? A sequence of characters that define a search pattern for validation.
  2. What are the attributes of IQ Bot? (Choose three) Improved customer experience , Faster decision making, Increased productivity
  3. If a table is missing a header in a column, where is the best spot to map the values? Headers of the table
  4. Where is custom logic defined in IQ Bot? (Choose one) form field level
  5. Where can you map a table-column value? Header of the table, First row of the table
  6. Which three OCR engines are available for 11.3.3? ABBYY FineReader, Tesseract, Microsoft Azure OCR
  7. A correction made by a user teaches the learning system and helps to avoid repeating the same error in future. Is this statement True or False? True
  8. Which two environment modes are valid for a learning instance? (Choose two) Production,Training
  9. Where can you view the progress/status of IQ Bot? Control Room Dashboard
  10. You can replace the default training document with a different document from the group. Is this statement True or False? True
  11. A Bot Developer license is required to train/validate data in IQ Bot. Is this statement True or False? False
  12. All formulas must result in either a true or false validation. Is this statement True or False? False
  13. In which format IQ Bot saves extracted information? (Choose one) CSV
  14. Which one step is not done during IQ Bot learning instance creation? Document batch processing upload scheduling
  15. Which one identifies the proper order of the IQ Bot workflow? (Choose one) Instance Creation, Document Analysis, IQ Bot Training, Instance in production, Validation, and Progress Monitoring..
  16. What is the use of custom logic feature? To edit certain field or table extraction results.
  17. After a learning instance is created, how do you upload a document to an IQ Bot learning instance for processing? Use a Task Bot that has the IQ Bot upload action.
  18. Which three operations can be performed on Number data type? (Choose three) COLSUM,SUM,<>
  19. You can modify (add/delete) the SIR for the fields within the Design page of IQ Bot. Is this statement True or False? False
  20. You can modify (add/delete) the SIR for the fields within the Design page of IQ Bot. Is this statement True or False? True
  21. It is possible to map a form field without using a label. Is this statement True or False? False
  22. Which statement is correct about IQ Bot processing header less tables? (Choose one) If all the headers are missing, IQ Bot cannot process them.