Hi Alan,
As far as I know, this functionality is already supported by the CompositeCommand as out of the box. You can find more information about the CompositeCommand and how to use it in the following blog post:
Regards,
Damian Cherubini
http://blogs.southworks.net/dcherubini