'Closes the workflow execution and records a
WorkflowExecutionFailed event in the history.'

def fail_workflow_execution(self, reason=None, details=None):

    o = {}
    o['decisionType'] = 'FailWorkflowExecution'
    attrs = o['failWorkflowExecutionDecisionAttributes'] = {}
    if (reason is not None):
        attrs['reason'] = reason
    if (details is not None):
        attrs['details'] = details
    self._data.append(o)
