cancel
Showing results for 
Search instead for 
Did you mean: 

AutomateC.exe & Automate.exe via command line

dcternes
Staff
Staff
Hi Everyone

I've got a couple of questions relating to invoking automate.exe and automatec.exe via the command line.

(a) If I attempt to start a BP runtime resource via CLI, the CLI doesn't return any output to indicate success or failure. All such information is written to the BP Resource PC window so my program is unable to tell if the "automate.exe /resourcepc ..." command has worked correctly. How have others handled this situation?

(b) Is there any way to shutdown a BP Runtime resource via CLI?

(c) I can trigger a process via "automatec.exe /run /startp ..." and can pass single instance data items via the "startp" xml string. I've not figured out how to pass in a collection however. Anyone know what the XML for that would be?

Thanks a lot.

Cheers
Dan



------------------------------
Dan Ternes
Blue Prism
Asia/Hong_Kong
------------------------------
6 REPLIES 6

RobinToll
Staff
Staff

Dan,

To your first point, I don't know of any direct way to find status once it's kicked off. Indirectly, you can do so through the BP app server, Windows Event Logs, the audit/session logs, and other secondary sources.

There's no direct way to shut down a resource, but there are both primary and secondary ways to shut down a process. First, there's the "/requeststop" command line parameter for AutomateC which politely asks a process to die (the process has to be built to acknowledge the request). Similary, there are secondary ways - using a purpose-built process, for example - to update flag variables or queue items to put a different process into a finalized state and convince it to end gracefully.

At an extreme, you can always just use a Windows command line/power shell command to kill the proces.

The easiest way to pass a collection like that, honestly, may be to do something like pass JSON in as a single string and then parse it inside the process. I believe it's possible to pass in collections but it's a more complex XML structure, if I remember rightly. Take a look at how data is stored inside work queue items - I believe it's the same structure?



------------------------------
Robin Toll
Senior Technical Consultant
Blue Prism
Professional Services Americas
Infrastructure & Architecture Specialist
------------------------------

Thanks Robin.

I decided if I was doing CLI anyway, I might as well go all-in so I achieved (a) using netstat (Google & StackOverflow were my friends for this 🙂 )

I haven't checked out (c) yet, but your suggestion is a good one so thanks very much for that.

------------------------------
Dan Ternes
APJ Technology Specialist
Blue Prism
Asia/Hong_Kong
------------------------------

Hi,

This is how we do it ; probably you already figured this out. ( Using Powershell )

& $automatec /dbconname $DBConnection /resource $Resource /port 8180 /sso /run "Login" /startp "<inputs><input name='Login Locally' type='flag' value='False' /><input name='Domain' type='text' value='<YourAD_Name>' /><input name='Credential Name' type='text' value='$Credentials' /> </inputs>"

All the best,

Håkan



------------------------------
Hakan Engman
Automation engineer
Teliacompany.com
Europe/Stockholm
------------------------------

Thanks a lot, Hakan. That's great.

------------------------------
Dan Ternes
APJ Technology Specialist
Blue Prism
Asia/Hong_Kong
------------------------------

SreeramRangu1
Level 2

Hi Dan,

To the pointer below - 

(b) Is there any way to shutdown a BP Runtime resource via CLI?

Lets say the available resource named rpa-bot-prod-128 is in need of a reboot - and we do pass a CLI as below 

shutdown /m \\rpa-bot-prod-128 /r /t 0

This will immediately initiate the shutdown process 

(please do let us know if this is a working for you - and do suggest if this is one among the allowed practices as well )



------------------------------
Sreeram Rangu

RPA CoE Controller 

CDK Global India
------------------------------

Hi @SreeramRangu1

​Here you have a list of the commands for the Resources PC https://bpdocs.blueprism.com/bp-7-0/en-us/helpResourcePCCommands.htm?Highlight=shutdown

You have an optional parameter for this, /waitforsessions . This wait until the session ends.

If this doesn't works, I will recommend you to stop the session first with the command /requeststop (here you have more info about this parameter https://bpdocs.blueprism.com/bp-7-0/en-us/helpCommandLine.htm?Highlight=requeststop), and then use the shutdown command as you said.


Hope this helps you!

See you in the community, bye 🙂


------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------