Hello friends, I do a lot of automation using UiPath. But UiPath does not always become sufficient for all the works. Some things cannot be done fully with UiPath. So, in that case I have to take a different approach. Like using Windows PowerShell script or simple CMD commands to do things.
First of all, let me explain what I was trying to achieve. I was working on an automation project for a restaurant. They have an online ordering platform running on Foodomaa. This platform does not offer automated printing of orders at the restaurant. So, the first part of the project was to automate this printing process. Whenever a new order comes the UiPath process would print the order at the restaurant’s kitchen.
The next challenge for the restaurant staff was to book the vehicle for the order delivery from Lalamove. It was fine when the number of orders was less. But with the increase in numbers, it becomes challenging. So, the next target was no automate that too. They offer self-pickup or delivery. Now I have to check the delivery type and if it was delivery then I have to book the delivery vehicle too.
In doing so there was a good thing. Lalamove offers API functionality. But Foodomaa does not have API functions. First, the team at DwishaVentures made the required API in the Foodomaa. They also prepared the API calls required for taking necessary data from Foodomaa and making the vehicle booking in Lalamove.
Now the challenge. They prepared a single command that to be executed on windows PowerShell. The command involved a node.js command Newman. Everything was working fine if done manually. But UiPath was just unable to execute the command on PowerShell. At first it was something like ‘newman command not found’. I was able to fix that after some googling.
- The node.js path needs to be added to both “User Variables” and “System variables”.
- And the most vital – the system MUST be RESTARTED after that.
Then the error changed to the following:
Invoke Power Shell: File C:\Users\*****\AppData\Roaming\npm\newman.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
That took a lot of searches and I finally made it run. To change the execution policy I have to run the following command in the elevated PowerShell (run as admin).
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
As of writing this I am unable to figure out how to make this change permanent. As we have to issue this command after each system boot up.
Leave a Reply Cancel reply
You must be logged in to post a comment.