cancel
Showing results for 
Search instead for 
Did you mean: 

Any work around to reading exportpackage command output

GopalBhaire
Level 10

Hello,

I am trying to use AutomateC to export package from Blue Prism (/exportpackage), running it normally works fine. But when I try to redirect output - to read whether the export was successful, either through code (dotnet/python/ps) or on cmd using (> out.txt) it results into error. Is there any workaround other that just not redirecting output. 

---> System.IO.IOException: The handle is invalid.

I just want to make sure the exported package is complete package.

Thanks



------------------------------
Gopal Bhaire
Senior Software Engineer
------------------------------
4 REPLIES 4

ewilson
Staff
Staff
@GopalBhaire,

Can you share exactly how you're doing this in Blue Prism? I assume you're using the Start Process Read Stderr and Stdout action of the Utility - Environment VBO? ​If so, can you share a screenshot of what you're setting the parameters to?

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

Hi @ewilson,

Thanks for your response. 

This is was done outside Blue Prism, as a script/console app to export package using Blue Prism command line (AutomateC - /exportpackage) but kept getting the error whenever I tried reading the output/error. Within Blue Prism I tried using the action you mentioned (adding working dir in code) which resulted in same error and finally I also tried the Utility - Blue Prism from DX exchange which inconviently has no Export Package action, and trying to add and run that action resulted in same error.

I just want to read the output of the command to be sure that package is exported without any errors.

100%: Saved release
Release: 'Test1 - Release 58' exported to file: 'Test1 - Release 58.bprelease'

Thanks,



------------------------------
Gopal Bhaire
Senior Software Engineer
------------------------------

Hi Gopal,

As you state you're using a script/console app to export this package, the guidance offered in this Knowledge Base article, "Why do I get a "handle is invalid" error when using PowerShell?" may provide some insight into why you're getting this error. There is also a suggestion to change the syntax of your command which may help prevent the error.

------------------------------
Steve Boggs
Senior Software Support Engineer
Blue Prism
Austin, TX
------------------------------

david.l.morris
Level 15

I know I'm necro'ing this post, but I found the answer in another post, and I confirmed it works for me. I was getting the same classic handle invalid error. I do think it is quite strange for Blue Prism CLI commands to not have been tested against PowerShell, but I wasn't there to see the reason it wasn't so I shall withhold judgement. 😃

The solution is near the bottom of this thread: Exporting a release using command line through Azu... - SS&C Blue Prism Community

I'll just repeat the solution here just in case that link ever breaks. The solution was to use Start-Process from inside of PowerShell. Note that I specifically wanted to use PowerShell.

So, this works in PowerShell for me:
Start-Process -Wait -FilePath "C:\Program Files\Blue Prism Limited\Blue Prism Automate\AutomateC.exe" -ArgumentList '/user "<username>" "<password>"', '/dbconname "<dbconName>"', '/exportpackage "<packageName>"', '/release "<customReleaseFileName>"'

Thanks to @AdityaPradhan for supplying the answer. PowerShell nearly ruined my day, but now I don't have to cry myself to sleep tonight.


Dave Morris, 3Ci at Southern Company