Script to check the progress of a workflow instance