2

I am trying to use the code stage in C# inside Blue Prism. I am using a custom object that I would like to be able to pass from one code stage to another inside Blue Prism.

I cant serialize my object, therefore I can't use Blue Prism Variable as output.

Here is my question: How can I keep a variable lifetime from one code stage to another? From my understanding, a variable gets removed from the heap whenever it is not referenced anymore in the code.

Any hint?

Thank you!

Sohail Ahmad
  • 7,309
  • 5
  • 27
  • 46
Scyther312
  • 53
  • 1
  • 5

1 Answers1

3

If you define the variable in the 'Global Code' then you can access it from code stages anywhere in your object.

Marek Stejskal
  • 2,698
  • 1
  • 20
  • 30
  • 1
    I tough I could only define class and function in Global Code. This is a good answer. Thank you, I have been looking for this for a while now already!! – Scyther312 Mar 17 '20 at 14:48