cancel
Showing results for 
Search instead for 
Did you mean: 

Polimorfismo in Objects

Anonymous
Not applicable
Hello, I would like to use a object but some dependency with another object that used the methods but this implemented more methods.   Thanks.
2 REPLIES 2

Hi Alexeik, If you're looking for polymorphism in Blue Prism, it's not inherently supported. However, I suppose you can still sort of accomplish the goal. You can do method overloading in a way. For example, let's say you wanted to run one method or another based on the number of provided inputs. And let's say your object's action takes two inputs: varA and varB. Your action would start by determining which of the two inputs parameters (varA or varB) have been given input data. Maybe your primary path/method is if both variables are given data. You would use a decision stage to check [varA]"""" AND [varB]"""". If this comes out to true, then your primary method is used and you just call a subpage that contains your primary logic that uses those values. If, however, no input data is given to those input parameters and the expression ([varA]"""" AND [varB]"""") comes out to false, then you use a secondary path/method/subpage that runs the action differently perhaps using default values. Notice that Blue Prism is not object-oriented. It does not have inheritance and polymorphism. It does not support dynamic object references. It is intended as a code free development environment. You might be able to get a similar end result, as with my example above, but Blue Prism isn't where you'll want to do that kind of advanced stuff.  Respectfully, Dave

Dave Morris, 3Ci at Southern Company

I always type something out and then realize I didn't understand the question. Your example looks to be method overriding, rather than method overloading. I still think you'd solve that problem in the same way. You have to interrogate input data to help your logic decide which path/flow/method/subpage to take.

Dave Morris, 3Ci at Southern Company