In other programming languages, we can do something like:
void myMethodA(var x) {
… if (myMethodB(x)) {
… …// Do some operation
…}
}
bool myMethodB() {
… if ( /* Some condition */) return true;
… else return false;
}
You can directly use the returned value from myMethodB inside if condition.
Can we do something similar in UiPath? I have always thought it is too much to store the returned value from another workflow in a variable like:
//WorkflowB {
… declare variable: result (Of Boolean)
… /* Do some operation */
… Assign: out_returnedVal = result
}
//Another workflow
… declare variable: result (Of Boolean) Invoke MethodB: out_returnedVal = result If (result) {
… //Do something
}
Don’t you all think this is too much work? Can’t we just use the returned value without storing it in a variable first?
I get your point, but I think the trade off of having a gui based program vs written code are these kinds of sacrifices. If you are worried about memory consumption, you could put the variable in a limited scope. For example, return “out_x” from the activity to “local_x” within a sequence. Once that sequence ends the variable is gone out of scope.
I was not really worried about the memory consumption. As much as I like using UiPath, I don’t like its interface much because it takes up lots of space.
For example, the if activity comes with “else” section whether or not you use it, and it takes up lots of space. One or two activities can take up one full computer screen, because UiPath activities stretch out a lot.
That’s why I was thinking if there is any way to make it smaller. But i guess it is not possible.
Yeah I hear you. I suppose the trade off is trying to build something that someone who isn’t a developer can create automations with, but there’s still much room for improvement.