This method should block until a task/workflow is in a Complete, Cancelled or Failed state. This method should then return an updated task object.
As part of the wait cycle, if the task has not been queried for an updated state in more than XXX seconds, the task state should be queried immediately, else the method should wait on querying until XXX seconds has passed since it was last queried.
Alternatively, if the underlying platform supports notification (ie callback), this method should wait until callback is made.
A timeout period should also be added such that if a task state cannot be determined after an extended period of time, this method should timeout and return or throw an exception.
If the underlying platform supports any of this, that functionality should be used and wrapped.