I'm 100% convinced that the launcher option is the best option for us. Thanks for the code for the beginning of the script.
Thanks.
Original Message:
Sent: Tue May 30, 2023 10:06 AM
From: Angelo Alves
Subject: Differentiate whether an execution is attended or unattended inside a bot
Hello
About getting the "Waiting" status, you have to enter the computer's configuration in the control center and set the "Queues runtime percentage" field to 100%. Optional: In the Queues runtime percentage field, enter the percentage of runtimes that the computer can run to process workload from features that use message queues. Common features that need a value different than zero set to this field are orchestration processes. The default value is 0%.
When using Launcher, there is one more step, which is to install the product on all user machines, or on a VM that the team accesses to run the bot.
In case you want to use the launcher, we can add the treatment below
- At the beginning of the script, place a messageBox, with a ten-second timeOut.
- If it is the user who starts the bot, he clicks Ok and will be asked for the store number
- Otherwise, the variable will be empty and you understand that it will be necessary to process all the stores.
I'm sending the script with this validation to add at the beginning of your script.
defVar --name exit --type NumericdefVar --name out --type StringdefVar --name erro --type StringdefVar --name store --type StringrunWindowsScript --scripttype "VBScript" --source "Text" --script "Set objShell = CreateObject(\"WScript.Shell\")\r\n\r\nintResult = objShell.Popup(\"Click ok to inform the store.\", 10, \"IBM RPA\", 0 + 64)\r\n\r\n\' Result\r\nIf intResult = 1 Then\r\n WScript.Echo \"Ok\"\r\nEnd If\r\n" --blockexecution exit=exitcode out=output erro=errorif --left "${out}" --operator "Contains" --right ok inputBox --title "IBM RPA" --prompt "Inform the store number" store=value logMessage --message "Launcher: Store [${store}]" --type "Info"else logMessage --message Scheduler --type "Info"endIf
I await your return.
------------------------------
Angelo Alves
IBM RPA Technical Specialist
Original Message:
Sent: Tue May 30, 2023 07:28 AM
From: Yon García Nistal
Subject: Differentiate whether an execution is attended or unattended inside a bot
Hi Angelo,
Thanks for your response.
I've tried this way, but when I run the bot nothing occurs and looking at Jobs it is in status Waiting.
If I manage to solve this we will do it this way, although I think it is more friendly for my colleagues to use the Launcher (keep in mind that we are a finance team, not IT).
Thank you,
------------------------------
Yon García Nistal
Skechers Iberia
Original Message:
Sent: Fri May 26, 2023 09:55 AM
From: Angelo Alves
Subject: Differentiate whether an execution is attended or unattended inside a bot
Hi Yon,
Today we have the Bot feature, which meets your need. You can run an unattended bot via Control Center, and the input parameters of your script are requested automatically for the user. Then the user can enter the store number and in your script, you do a treatment, if the store number is empty(weekly execution) it generates the report for all stores, otherwise only the store entered.
Documentation: Running bots
And you can create a new Role to add to the user for him to have access only to run the bot
hope it helps you
------------------------------
Angelo Alves
IBM RPA Technical Specialist
Original Message:
Sent: Fri May 26, 2023 04:44 AM
From: Yon García Nistal
Subject: Differentiate whether an execution is attended or unattended inside a bot
Hi All,
I'm developing a bot to perform a weekly process, which consists of downloading a report by store. This would be to run unattended.
At the same time I want the bot to have the option to allow users to choose the stores they want to get the reports from in an attended way.
It is not viable to generate the reports for all the stores if they only need 2 or 3 for example, as it would take too long, this is why right now we have two bot (one for unattended and one attended execution). So does anyone know if it is possible to unify them with a conditional statement?
Thanks!
------------------------------
Yon García Nistal
Skechers Iberia
------------------------------