'Returns the slug of the step which the workflow should begin on.
This method takes into account both already-available data and errors
within the steps.'

def get_entry_point(self):

    if self.entry_point:
        if self.get_step(self.entry_point):
            return self.entry_point
    for step in self.steps:
        if step.has_errors:
            return step.slug
        try:
            step._verify_contributions(self.context)
        except exceptions.WorkflowError:
            return step.slug
    return self.steps[0].slug
