From 259d8a80994f118fa056f5bd6e0bc7d2a44bdd24 Mon Sep 17 00:00:00 2001 From: amassalh Date: Thu, 5 Jul 2018 13:44:39 +0000 Subject: [PATCH] add docs for states. add docs explaining what each state mean. Change-Id: I0092473c3be7f5ef5a28532984ebbe753434becb --- mistral/workflow/states.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/mistral/workflow/states.py b/mistral/workflow/states.py index 861f7af05..bf9d5d64e 100644 --- a/mistral/workflow/states.py +++ b/mistral/workflow/states.py @@ -15,15 +15,34 @@ """Valid task and workflow states.""" -# TODO(rakhmerov): need docs explaining what each state means. IDLE = 'IDLE' +"""Task is not started yet.""" + WAITING = 'WAITING' +""" +Task execution object has been created, but it is not ready to start because +some preconditions are not met. +NOTE: +The task may never run just because some of the preconditions may never be met. +""" + RUNNING = 'RUNNING' +"""Task, action or workflow is currently being executed.""" + RUNNING_DELAYED = 'DELAYED' +"""Task is in the running state but temporarily delayed.""" + PAUSED = 'PAUSED' +"""Task, action or workflow has been paused.""" + SUCCESS = 'SUCCESS' +"""Task, action or workflow has finished successfully.""" + CANCELLED = 'CANCELLED' +"""Task, action or workflow has been cancelled.""" + ERROR = 'ERROR' +"""Task, action or workflow has finished with an error.""" _ALL = [ IDLE,