Skip to content

April 2024

BotCity Orchestrator

Snippets Generator

We are introducing the new Snippets Generator feature.

Our interest in doing this is to engage users more with the most advanced features and allow them to enhance their experience by simply accessing what is already available to them.

Find Custom Snippets

Every Orchestrator feature will have the Snippet Generator feature.

chrome-capture-2024-4-24 (2) (1).gif

Click this button to find code snippets for various use cases.

chrome-capture-2024-4-24.gif

Users will be able to choose which language they want the code snippet to be in, with a choice of Python, Java, JavaScript, and TypeScript.

Snippet Generator_img3.png

And if there is a specific attribute in the snippet, the user can select it directly on the screen. In this example, they can select the type of file they want to import when performing an artifact upload action.

chrome-capture-2024-4-24 (1).gif

Getting the code into your IDE

After selecting the use case, language, and any special attributes, a snippet is generated... This code can be copied using the "copy code" button and pasted into the user's preferred IDE.

CPT2404241116-619x479.gif

Note: It is not possible to edit code within the snippet generator. If the user wants to edit something, he has to do it directly in his IDE.

If you have questions

If you have questions about a use case or a snippet, you can consult the Botcity documentation via the "how to use" hyperlink.

Snippet Generator_img8.png

Product features that include the [snippet generator] feature:

  • Data Pool
  • New task
  • Alerts
  • Error log
  • Execution Log
  • Result Files
  • Credentials

Easy Deploy for existing automation

It came to our attention that some users were trying to use the Easy Deploy feature to upload new bots into existing automations, and until now it wasn't possible, so we changed that.

Now it will be possible to deploy a bot for new or existing** automation through this feature, making it easier to deploy a new bot to any automation.

Two options to start

Now, at the beginning of the Easy Deploy flow, there are these two options:

  • Create new automation
  • Choose existing automation

Easy deploy - enable choose automation - New.png

After that, the two paths are pretty similar, only with a few differences. In the existing automation path, some information comes already filled, and some can't be edited.

Screens sequence for new automation

Easy deploy - enable choose automation - New.png Easy deploy - enable choose automation - New-4.png Easy deploy - enable choose automation - New-1.png Easy deploy - enable choose automation - New-3.png

Screens sequence for existing automation

Easy deploy - enable choose automation - Choose-5.png Easy deploy - enable choose automation - Choose-5.png Easy deploy - enable choose automation - Choose-3.png Easy deploy - enable choose automation - Choose-2.png Easy deploy - enable choose automation - Choose-1.png

Release bot option

Now it's possible to release the bot that's being deployed by selecting this option here:

You need a Runner to start

One other thing we changed is that it is no longer possible to create a new Runner in this flow, so if the workspace still doesn't have a Runner, the user will see this screen, taking them to SDK download and instructions.

Easy deploy - enable choose automation - New (1).png

BotCity Studio SDK - 2.20.0

Warning

The upgrade to this new release is strongly recommended as it brings great enhancements for the BotCity Runner related to how log files are handled and overall stability.

BotCity Studio - Version 2.20.0

This release of the BotCity Studio received one feature improvement and a handful of issue/bug fixes.

Specifying a repository during deploy

If you use BotCity Studio to deploy, update and release your bots to BotCity Orchestrator you will now be able to specify the proper repository in which to allocate your bot.

Issues/Bugs fixed

  • Addressed a bug that caused Studio to take a screenshot when * was pressed in the numeric keypad
  • Addressed an issue that caused the Studio icon to blink at the startup bar when a screenshot was taken
  • Addressed an issue that caused the project files list to be out of sync with the disk
  • Addressed an issue that caused the UI image panel to have a dimension different than the screen resolution

Runner - Version 2.8.4

BotCity Runner version 2.8.4 brings improved stability against connectivity issues as well as some longtime desired log improvements.

Stability

BotCity Runner will now retry operations if the communication with BotCity Orchestrator fails due to a connectivity issue.

A special focus was added to the bot download procedure in which BotCity Runner will retry the download up to 5 times before reporting an error.

Logs

In previous releases, the log file, log.txt, was constantly reset whenever the Runner was restarted. Moreover, there was no limit to its size which caused problems for long-running operations.

Starting with this version, the logs are now located inside the logs folder and they are never overwritten.

We also added a feature to rotate the log in case one of the following situations happens:

  1. A new day starts
  2. The log reaches 3MB in size

Tip

We also added protection to ensure that the logs folder does not grow indefinitely.

The system will automatically purge old log files when the logs folder size reaches 1GB in size or files are older than 7 days.

Check out the BotCity Runner documentation for customization options and additional information.

Issues/Bugs fixed

  • Addressed an issue that caused the PYTHONPATH to be overwritten by the Runner

CLI - Version 1.2.4

This new version of the BotCity CLI brings many improvements to features, better error messages and visual output of commands.

Specifying the repository

You can now specify a repository when deploying a bot or creating a new execution log.

Parameters for scheduling

When creating a new scheduling for a given automation you can now specify the parameters associated with this scheduling instance. Learn more and see examples here.

Enhanced Task Report

The task report command to export data from the tasks queue was improved to bring more information.

The new fields are:

  • Repository Label
  • Total Items, Processed Items and Failed Items
  • Date Start Running
  • Duration (Seconds)

Click here to learn more about this feature.

Better visual output and error messages

BotCLI

Security

Our team updated all external dependencies to incorporate upstream fixes for possible vulnerabilities and performance improvements.

Python Frameworks

Support for Python 3.12

All the frameworks and plugins are now fully compatible with Python 3.12.

If you find any issues, please report them to our Automation Experience team.

BotCity Maestro SDK - Version 0.5.1

Note

This release removes the compatibility layer with BotCity Orchestrator API v1 which is no longer available in any of our servers.

Reporting the number of items processed in total, with success and failure

You can now specify the total number of items and the number of items processed with success and failure by each of your tasks when reporting its finish status using the maestro.finish_task method.

Important

This change is strongly recommended as it will be a key aspect of the BotCity Orchestrator and BotCity Insights related to ROI, savings, and FTEs.

Here is how you can modify your code to report your items:

# Import for integration with BotCity Maestro SDK
from botcity.maestro import *

def main():
    ...
    maestro.finish_task(
        task_id=execution.task_id,
        status=AutomationTaskFinishStatus.SUCCESS,
        message="Task Finished with Success.",
      total_items=10,
      processed_items=6,
      failed_items=4
    )

...

Mocking SDK calls when disconnected

You can now enable a new option MOCK_OBJECT_WHEN_DISCONNECTED to return instances of the expected object when running the code disconnected from the orchestrator.

Before this option, the SDK would return None or a stub function which would make code like the example below crash.

# Import for integration with BotCity Maestro SDK
from botcity.maestro import *

# Disable errors if we are not connected to Maestro
BotMaestroSDK.RAISE_NOT_CONNECTED = False
# Opt-in to receive mock objects when not connected to Maestro
BotMaestroSDK.MOCK_OBJECT_WHEN_DISCONNECTED = True

def main():
    maestro = BotMaestroSDK()
    maestro.from_sys_args()
    task = maestro.get_task("12345")
    print("Maestro Task: ", task)
    print("Task Interrupted: ", task.is_interrupted())

if __name__ == '__main__':
    main()

"""
This will generate the following output:

Maestro Task:
AutomationTask(
    id=0, state=<AutomationTaskState.START: 'START'>,
    parameters=None, input_file=None, activity_id=0,
    activity_label=None, agent_id=0,
    user_creation_id=0, user_creation_name=None,
    org_creation_id=0, date_creation=None, date_last_modified=None,
    finish_status=<AutomationTaskFinishStatus.FAILED: 'FAILED'>, finish_message=None,
    test=False, interrupted=False, killed=False, machine_id=None
)

Task Interrupted:  False
"""

Issues/Bugs fixed

  • Addressed an issue where the VERIFY_SSL_CERT flag was not being used when making requests
  • Addressed an issue where the timeout value was not properly propagated when configured

BotCity Framework Web - Version 1.0.0

This is a major release as it changes the major version of Selenium from 3 to 4.

Our team was diligent as to create a compatibility layer to avoid issues with existing code where possible under the encapsulated method calls.

To use this new version we recommend that you change the version in your requirements.txt file to something similar to this:

botcity-framework-web>=1.0.0,<2.0

Support for Selenium 4

Our framework was updated to support Selenium version 4 with a backward compatibility layer for Selenium 3.x syntax.

If you run into any issues please report your findings to our Automation Experience team or open an issue in our GitHub repository.

Experimental support for undetected_chromedriver

This release adds experimental support to undetected_chromedriver as one of the possible browsers. Find out more about undetected_chromedriver by clicking here.

You can give it a try by changing the browser property to UNDETECTED_CHROME:

# Import the Browser enum
from botcity.web import WebBot, Browser

def main():
    # Instantiate the WebBot.
    bot = WebBot()

    # Configure whether or not to run on headless mode.
    bot.headless = False

    # Configure the browser as UNDETECTED CHROME
    bot.browser = Browser.UNDETECTED_CHROME

    ...

Important

Please note that it is not a guarantee that your automation will not be detected by bot detection mechanisms.

Automatic browser cleanup

We added an atexit hook to ensure that stop_browser is always invoked.

This helps prevent issues where the code is left running and locking the BotCity Runner until the webdriver is finished due to the code not calling stop_browser at the end

Issues/Bugs fixed

  • Disabled smart screen protection in Microsoft Edge
  • Addressed an issue when no tab was active when stopping the browser

Java Frameworks

BotCity Maestro SDK - Version 2.2.0

Reporting the number of items processed in total, with success and failure

You can now specify the total number of items and the number of items processed with success and failure by each of your tasks when reporting its finish status using the maestro.finishTask method.

Important

This change is strongly recommended as it will be a key aspect of the BotCity Orchestrator and BotCity Insights related to ROI, savings, and FTEs.

Here is how you can modify your code to report your items:

...

int totalItems = 10;
int processedItems = 6;
int failedItems = 4;

maestro.finishTask(
    task.id, "Task Finished with Success.", FinishStatus.SUCCESS,
  totalItems, processedItems, failedItems
);
...