Unzip Files using invoke method

If it’s a one-off usage, go with the .xaml as you have. But if you’ll need this functionality in multiple projects (with Zip/Unzip it’s a pretty good guess that you’ll use it in different places) or if you’ll be zipping a lot of files, I’d definitely go with a compiled CodeActivity (.dll packed to a .nupkg).

I’d go with these questions when thinking about creating a custom CodeActivity:

  1. Will it be used in multiple projects or in many places across a project?
  2. Are arguments enough to fully use the activity?
  3. Is the operation fully encapsulated within?
  4. Is the operation straightforward enough to be understandable without the verbosity of a workflow?
  5. Is speed of execution important? (compiled code is faster, as a rule of thumb)
  6. Is it easier/more readable to do it from code?
  7. Is the functionality relatively static, as in it won’ need to change often?

If you answer Yes to most of them, it’s a good candidate. It can still vary case-by-case, but usually for simple utility code (zip/unzip, read/write, data parsing etc.) it’s a one-and-done job to make an activity which you won’t need to worry about later.

Sooner or later you will probably need a custom activity for something, might as well get to know how to build them on the easy stuff.

Regards,
Andrzej

5 Likes