aboutsummaryrefslogtreecommitdiffstats
path: root/src/workflow/README
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-12-19 12:39:01 -0500
committerParker Berberian <pberberian@iol.unh.edu>2020-01-28 16:09:35 -0500
commit77377d5e9362bd35a3b300df231e82ee974675e1 (patch)
tree5e3799768eb887a0259c8c21ed61123cdde2d608 /src/workflow/README
parent899e1a4baa95d0bc6f0eef34de66f0e257174878 (diff)
Comments and Documentation
This change adds a ton of comments and documentation across all the code. Change-Id: Ifee0a2f534e8584f14b0f13af4dda8dc70eb7553 Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/workflow/README')
-rw-r--r--src/workflow/README31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/workflow/README b/src/workflow/README
new file mode 100644
index 0000000..fb4b949
--- /dev/null
+++ b/src/workflow/README
@@ -0,0 +1,31 @@
+This app creates "workflows", which are long and complex interactions from the user.
+Workflows are composed of multiple steps. At each step the user inputs some information.
+The content of one step may impact following steps.
+
+The WorkflowStep object is the abstract type for all the workflow steps.
+Important attributes and methods:
+
+template - the django template to use when rendering this step
+valid - the status code from WorkflowStepStatus
+
+get_context() - returns a dictionary that is used when rendering this step's template
+ You should always call super's get_context and add / overwrite any data into that
+ dictionary
+
+post(data, user) - this method is called when the step is POST'd to.
+ data is from the request object, suitable for a Form's constructor
+
+
+Repository
+Each step has a reference to a shared repository (self.repo).
+The repo is a key-value store that allows the steps to share data
+
+Steps render based on the current state of the repo. For example, a step
+may get information about each host the user said they want and ask for additional
+input for each machine.
+Because the steps render based on what is in the repo, a user can easily go back to
+a previous step and change some data. This data will change in the repo and
+affect later steps accordingly.
+
+Everything stored in the repo is temporary. After a workflow has been completed, the repo
+is translated into Django models and saved to the database.