First stab at converting to invoke tasks

Ref: #2294