cancel
Showing results for 
Search instead for 
Did you mean: 

Code stages and Python

ewilson
Staff
Staff
Hi Folks,

We've posted a new document to the DX Developer Portal dealing with code stages. Chapter 9 of this document discusses the use of Python from Blue Prism. You can find it here:

Code Stages


------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------
10 REPLIES 10

SachinJagdale
Level 4
Hey Eric,

Its fantastic. But still its not that much great to execute python scripts within Blue Prism. Also you mentioned into steps that we can play with Iron Python. Then it would be great step if we have a VBO internally to get python scripts executed.


------------------------------
Sachin J
RPA Modeler
BNY Mellon Technology
Asia/Kolkata
------------------------------

Hi Sachin,

I'm not sure I understand your statement about not being great to execute Python scripts in Blue Prism. This is simply an example of one option. There's no requirement to use Iron Python. You could just as easily execute Python scripts using the Process and ProcessStartInfo objects of .Net.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Please, Eric, could this guide have an Exception Handling for Code Stages?
"On Error GoTo" examples

Thanks!

------------------------------
Eduardo Gomes Serradela de Carvalho
------------------------------

Hi Eduardo,

Are you referring to having example code about how to use a traditional VB "On Error..." statement?

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

​Yes, I was trying to create an "OnError ... " so error messages would be sent to an output instead of stopping the process.

I got 2 ways to make it work.

First, using VBS OnError:
On Error Resume Next   ' Defer error handling.  
Err.Clear  
Err.Raise(448)   ' Custom Error Exception; ex: 6 = Overflow, 448 = name not found 
		' Check for error, then show message.  
If Err.Number <> 0 Then  
	ErrorMsg = "Error # " & Str(Err.Number) & " was generated by " _  
        & Err.Source & ". Description: " & Err.Description  
End If​



but it's also possible with Recover and Resume stages, as below picture.
8766.png



Thank you, Eric!

------------------------------
Eduardo Gomes Serradela de Carvalho
------------------------------

@EduardoGS_Carva ​great examples of how to address that situation. 😉

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Kasper_HolmBjer
Level 2
Hi Eric,
The link from your post is no longer active.
Can you provide an updated link to the code stages guide?

-
Kasper Holm Bjerring

------------------------------
Kasper Holm Bjerring
------------------------------

@ewilson

------------------------------
Kasper Holm Bjerring
------------------------------

@Kasper Holm Bjerring,

See attached.

Cheers,



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