msf4-0 / Blockly4RPA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blockly4RPA

License Issues Start Releases Downloads

Blockly4RPA is a drag and drop Web-Based Low Code User Interface (UI) or Robotic Process Automation (RPA) based on TagUI. Each of it blocks represent a command in python, which can be later run into any IDE.

Blockly4RPA_UI

Fig1 representaion of the UI with a sample block flow and anotation of each part associate to the UI

Instal Blockly locally

To have Blockly4Rpa running locally it will reqquired you to install dependencies software

  1. download the zip file from gitHub

  2. install python 3.9 or any latest version

  3. install node red to run locally

  4. install rpa package for python

  5. unzip Blockly4RPA file and open index.html using your browser

  6. open node red flow

    • open your command prompt
    • set your directory to $cd ".../Blockly4RPA/scripts"
    • then run flow by typing into you command prompt $node-red flowRunButton.json
    • if node red was installed prorparly you will see something similar to this in your command prompt

    image

    Fig2 command prompt after node-red is run locally

    • now you can copy the url highlighted in white and paste into your browser to have node-red running
    • then click on deploy btton to deploy the Node-red Dashboard UI
    • Do not close the command prompt doing so will stop the flow of node red

Your are now set to write your own flow.

Build a Flow

Now that all it set, all it left it building your rpa flow, to do so some basic knowledge of python and rpa it essential. However most of the blocks in the toolbar in web APP UI have and hint on how to use it or what it does which it showed when the mouse is on top of it and if more informations is needed there is reference help page attach to that can be found up on right click on the block.

block_hint.mp4
block_help.mp4

Export Flow and Download Python file

After the flow is built, it may required to be saved or just save the python generated code of it which can be seen in the leftmost area of the UI. To do so you need to click on the "Export Flow" and "Download Python" on the blue panel (Fig3) respectively to export the XML file containing the block as in the workspace display and download the python script as appeard in the code generator box. !!! The code generator is text edit box, however all change made directly to it would not appear in the download python script only if modification made on the block itself. Clicking one of them will pop up a box (Fig4) where the file name need to be enter then the file will be saved into the directory set by the browser in use. If a need of download directory is need, you can refer to this on how to do it.

fig 3

Fig3 control panel button

image

Fig4 file name input popup box

Import Built Flow

To modify a flow previoulsy built you will need fisrst to delete all the blocks currently present in the workspace by either dragging each block to the bin or reloading the web page, not doing so will make the imported workspace overlap with the current one. Then click on "Import Workspace" in the blue panel then choose the file xml you want to import then click on "Import" follow by "close" there you have your old workspace.

import.video.mp4

Run Python script using Blockly4RPA

To run your downloaded pythin script you can clic on "Run Python" in blue panel (Fig3) then the node-red dashboard UI, to run your file you will need to enter the location of your file enclose in to double quotation marks then press enter. !!! Enter the location according to the default location your command prompt open in, example if your command prompt open in the user directory(Fig5) and your file is located in Downloads your entry will look like this "Downloads/py_file.py"(Fig6), if your file is located in same directory as the command prompt pointing all you need to do it to type the name of your file eg py_file.py without the quotation marks

image

Fig5 command prompt default directory

image

Fig6 node-red UI dashboard

While your file is running you can have a look at the node-red dashboard to see if your file has any error or get any output print message from the debug window as annotaded in Fig7.

node-red-dashboard

Fig7 Node-red dashboard

Flow-Samples

You can have have a look at some flow sample in here, where there is different xml file, a tutorial on how to build a flow from scratch and snip image of build workspace.

Block & generators structure

To know more about the each block and generator structure have look at the blocks and generators directory, where you have blocks file names as each category in Blockly4RPA toolbox. However there are some blocks which are default imported from blockly for which detail can found in blocks and generators directory in Blockly repository.

Blocks usage

To learn and understand how to use a specific block under evry category have look at wiki page for the for the default blocks imported from blockly here and for the customized blocks here

Test OS

Be aware that all example and test are made using a Window OS certainfunctionality may differ for different OS.

Contributing to Blockly4RPA

want to help us improve in Blockly4RPA? You are welcome. First you may need to do pull request after being grand the authority to add or modify the code. You may have a look at the contributing file for some guidelines to follow so we can keep a clean flow structure.

About

License:Apache License 2.0


Languages

Language:JavaScript 69.6%Language:HTML 29.9%Language:CSS 0.5%