def stop()

in src/stepfunctions/workflow/stepfunctions.py [0:0]


    def stop(self, cause=None, error=None):
        """
        Stops a workflow execution.

        Args:
            error (str, optional): The error code of the failure. (default: None)
            cause (str, optional): A more detailed explanation of the cause of the failure. (default: None)

        Returns:
            dict: Datetime of when the workflow execution was stopped. Example below::

                {
                    'stopDate': datetime(2015, 1, 1)
                }

            **Response structure**:

            * (dict)
                * stopDate (datetime): The date the workflow execution is stopped
        """
        params = {
            'executionArn': self.execution_arn
        }
        if cause is not None:
            params['cause'] = cause
        if error is not None:
            params['error'] = error
        response = self.client.stop_execution(**params)
        logger.info("Stopping the execution %s of the workflow %s on AWS Step Functions.", self.execution_arn, self.workflow.name)
        return response