This is similar to the wait method in the Query Service and will wait by default indefinitely for a workflow job to complete and poll the server regularly to update the local status. When the job is completed (or failed) the method will return the workflow job object.
workflow_wait(job, max_seconds = NULL, poll_period = 0.5)
WorkflowJob object