From b70d3c2c75befe747079697a66b1bb417749e786 Mon Sep 17 00:00:00 2001 From: Greg Leclercq Date: Tue, 8 Jul 2014 23:14:16 +0200 Subject: [PATCH] Update Workflow: add abstract method .on_failure() --- simpleflow/workflow.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/simpleflow/workflow.py b/simpleflow/workflow.py index 85a4a73bf..44052a4de 100644 --- a/simpleflow/workflow.py +++ b/simpleflow/workflow.py @@ -62,3 +62,10 @@ def fail(self, reason, details=None): def run(self, *args, **kwargs): raise NotImplementedError + + def on_failure(self, history, reason, details=None): + """ + The executor calls this method when the workflow fails. + + """ + raise NotImplementedError