'Adds an error message to the workflow\'s Step.
This is useful when you wish for API errors to appear as errors
on the form rather than using the messages framework.
The workflow\'s Step is specified by its slug.'

def add_error_to_step(self, message, slug):

    step = self.get_step(slug)
    if step:
        step.add_step_error(message)
