cancel
Showing results for 
Search instead for 
Did you mean: 

Get Stage Name as Data Item

Filip-EmilianCo
Level 2

Hi!

I am currently working on a protocol for assigning error codes to exceptions. Part of the protocol involves using the actual Name of the Stage as the beginning of the Exception Detail. 

My question is. Is there a simple way of grabbing the Name of the Exception Stage similar to how ExceptionDetail() is used, but within the stage itself only. Like a local function ExceptionName() that would fetch the name of the stage within the function itself is used, function that could not be used outside of an Exception Detail.

For example:

33866.png

If this can not be done in any easy/straight forward way. Is there a way for this to be implemented within BluePrism? At the moment, exception details are prone to human error due to copy paste from the Stage Name to the Exception Detail. Any way I can submit this as a suggestion if this does not exist as of yet?

Looking forward to your feedback

*Edit*
I realised after posting that while writing up the above, I developed my idea further and moved away from getting the name into a data item but I am now unable to change the title of this post to reflect the change. My apologies!

Cheers

Filip



------------------------------
Filip-Emilian Cosarca
------------------------------

2 REPLIES 2

John__Carter
Staff
Staff

Hi Filip-Emilian - there is no way to do this unfortunately. I know I've suggested this kind of feature before (for exactly the reasons you point out above) and I suspect others have too. It would be ideal if there was a range of context functions such as MyName(), MyPage(), MyParent(), MyProcess() etc 

https://community.blueprism.com/participate/ideation-home



------------------------------
John Carter
Blue Prism
------------------------------

DaveMorris
Level 14

ExceptionStage() will at least return the name of the stage that threw the exception last. The problem with this is of course that it you only get the latest name, and depending on how your exception handling is and at what level it is, you may not be able to get the original stage name. But, for example, if you have a calculation stage that divides by zero and then a catch block around that, then a recover then a calc stage or whatever, you can use ExceptionStage() while in recovery mode to get the name of that calc stage at runtime. Is that not what you're looking for?

That said, I would ABSOLUTELY LOVE to be able to retrieve names of things at runtime, such as what John described. My favorite would be MyPage() and MyProcess(). Oh god, it would just be so wonderful. I would rather Dark Mode, but it would be a toss up which would be better. 😃



------------------------------
Dave Morris
3Ci at Southern Company
Atlanta, GA
------------------------------
Dave Morris 3Ci at Southern Company Atlanta, GA