public function checkProgress()
{
// Fetch the workflow status from the API.
$this->poll();
if ($this->isFinished()) {
// If the workflow failed then figure out the correct output message and throw an exception.
if (!$this->isSuccessful()) {
throw new TerminusException($this->getMessage());
}
return true;
}
return false;
}