Support > Forums > OpenBots Studio > Different Execution in Builder & Attended Modes

Different Execution in Builder & Attended Modes

M V

  • Reporter
  • Calender Icon June 02,2021 at 9:32 AM

I am fairly new to RPA and this is basically about my first bot, so please don't eat me alive:)

I noticed that the execution of the same bot in builder mode and attended mode tends to give different results - of course some of this is inevitable due to the builder mode showing the OpenBots window, which activates on each line execution, however there are more subtle things as well, one of which I don't seem unable to find my way around:

My bot needs to pull some information from an application that is accessible only through... a Citrix remote window. I managed to handle the task with relative reliability using image recognition, however in the Attended mode, I seem to run into an issue right away - the bot activates the Citrix window and is supposed to click on a button, however it throws out an error

Error: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'frmScriptEngine'.

This is the entire log for the relevant part:

2021-06-02 10:14:00.256 +02:00 [INF] Resuming Parent Task: Main.obscript
2021-06-02 10:14:00.277 +02:00 [INF] Running Line 4: Get report - Run Task [Run '{ProjectPath}\03XXXX.obscript']
2021-06-02 10:14:00.372 +02:00 [INF] Executing Child Task: 03XXXX.obscript
2021-06-02 10:14:00.419 +02:00 [INF] Engine Class has been initialized
2021-06-02 10:14:00.419 +02:00 [INF] Client requesting to execute script using frmEngine
2021-06-02 10:14:00.419 +02:00 [INF] Bot Engine Started: 02/06/2021 10:14:00
2021-06-02 10:14:00.450 +02:00 [INF] Deserializing File
2021-06-02 10:14:00.456 +02:00 [INF] Script Path: C:\Users\XXXX\AppData\Local\Temp\OpenBotsStudio\XXXX_1.5.0\03XXXX.obscript
2021-06-02 10:14:00.958 +02:00 [INF] Creating Variable List
2021-06-02 10:14:00.973 +02:00 [INF] Creating Argument List
2021-06-02 10:14:00.989 +02:00 [INF] Creating Element List
2021-06-02 10:14:01.005 +02:00 [INF] Creating App Instance Tracking List
2021-06-02 10:14:01.036 +02:00 [INF] Running Line 5: Activate Window [Window 'My Beloved Citrix Gateway - \\Remote']
2021-06-02 10:14:01.105 +02:00 [INF] Running Line 6: Click XXXX Icon - Surface Automation [Click Image on Screen - Accuracy '0,8']
2021-06-02 10:14:01.190 +02:00 [INF] Result Code: Error
2021-06-02 10:14:01.190 +02:00 [ERR] Error: System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'frmScriptEngine'.
   at OpenBots.Engine.AutomationEngineInstance.ExecuteCommand(ScriptAction command)
2021-06-02 10:14:01.259 +02:00 [INF] Resuming Parent Task: Main.obscript
2021-06-02 10:14:01.259 +02:00 [INF] Result Code: Error
2021-06-02 10:14:01.259 +02:00 [ERR] Error: System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
   at OpenBots.Engine.AutomationEngineInstance.ExecuteCommand(ScriptAction command)

Any idea what might be the problem?

This forum has 172 topics, 459 replies, and was last updated 2 hours ago by Poornima Malv

Nataly Alvarado

  • Participant
  • Calender Icon June 03,2021 at 3:50 PM

Hello!

As you mentioned, the attended Studio mode may present slight changes to the way the automation runs. We will look further into the commands presenting you issues. However, I do recommend using OpenBots Agent/Server to run your automations. As that is the most reliable and safe way to run jobs on both attended and unattended mode. In addition, Server provides more robust functionalities to manage and orchestrate your automations.

M V

  • Participant
  • Calender Icon June 03,2021 at 9:26 AM

Hello, will try - I have 1.4... the release schedule on this is insane:)

Akesh John Koshy

  • Participant
  • Calender Icon June 02,2021 at 9:44 AM

Hi @MV

which version of the studio are you using ? .if your using verison 1.4 upgrade it to v1.5 it might solve your issue !

"System.ObjectDisposedException: Cannot access a disposed object. Object name: 'frmScriptEngine'." I am aware of this error and i believe this error is thrown from running the bot using builder mode . The workaround that i have found out is to run the bot from the OpenBots server or you can run it in attended mode and apart from syntax errors your code should work fine. i am not sure whether it will work for you just give it a try

You are not authorized to reply, please click here to login and add your reply to this topic.