We have a few online learning resources that may also be of interest to you:

Here's one: One best practice we often recommend is to build backwards.. Build business operations first, then business processes, then business services. That way you can test your business operation using the test utility and then when you go to test your business process, you know any new issues must be in the business process. And finally when you create your business service, you can pass a message in like normal and know that the interface works as a whole.

Very interesting Mike! Thanks for sharing. There are always multiple ways to solve a problem but I think you're on to something here...

So thinking through a bit more about when this approach might make more sense than using a built in loop (like a foreach): Because the stream was one item, it sounds like a foreach would probably have been more difficult in that situation? Were there other ways you considered doing this? And if so, what went into the decision to use the code action here? I'm assuming this was called from a business process built using the Business Process Designer?

That's a cool idea of setting variables in debug/testing mode!

To get the conversation started: One interesting way I've seen people use code actions is to comment out several actions while debugging. Since its not immediately apparent what is in a code block, you need to be careful to clean up your work when you are finished (potentially removing actions you no longer want as well as removing your code block) so others (and let's face it, you!) don't get confused later.