Invoke Method Activity

I find ‘Invoke Method’ activity confusing because it includes two mutual exclusive operations:

  • invoking a static method from a type;
  • invoking an object method from an object;

I suggest splitting this activity in two other activities.

1 Like

I’m not really sure if that’s a good idea.

InvokeMethod is one of built-in System.Activities and splitting it would require rolling your own implementation that you then need to maintain, with very little gain.
For people understanding the difference between static and instance methods confusion is not there (outside of initial learning of what this activity does). For others, splitting it into 2 would probably create more confusion.

Personally I just use it solely for void methods and from useability perspective there’s little difference in the overloads, very similar to specifying an Element or a Selector for any UI activity. Stretching it a little one could even argue that an Element is an Object, while a Selector is a description of an Element i.e. a Type of Element, bringing them even closer in comparison.

It also IMHO goes against the sticky Simplify Feature Set - this one would immediately go into that list, because if implemented properly, there should literally be no difference in execution from the built-in version and just adds maintenance overhead and possible bugs.
With that in mind, I don’t think it’s worth the work needed.

That’s just my opinion of course - it’s your call :slight_smile:



Hi, But now may i ask, What is the differene between static and Instance?