'Returns the template context, including the workflow class.
This method should be overridden in subclasses to provide additional
context data to the template.'

def get_context_data(self, **kwargs):

    context = super(WorkflowView, self).get_context_data(**kwargs)
    workflow = self.get_workflow()
    workflow.verify_integrity()
    context[self.context_object_name] = workflow
    next = self.request.GET.get(workflow.redirect_param_name)
    context['REDIRECT_URL'] = next
    context['layout'] = self.get_layout()
    context['modal'] = ('modal' in context['layout'])
    if (ADD_TO_FIELD_HEADER in self.request.META):
        context['add_to_field'] = self.request.META[ADD_TO_FIELD_HEADER]
    return context
