add nick
[laas.git] / src / workflow / README
1 This app creates "workflows", which are long and complex interactions from the user.
2 Workflows are composed of multiple steps. At each step the user inputs some information.
3 The content of one step may impact following steps.
4
5 The WorkflowStep object is the abstract type for all the workflow steps.
6 Important attributes and methods:
7
8 template - the django template to use when rendering this step
9 valid - the status code from WorkflowStepStatus
10
11 get_context() - returns a dictionary that is used when rendering this step's template
12     You should always call super's get_context and add / overwrite any data into that
13     dictionary
14
15 post(data, user) - this method is called when the step is POST'd to.
16     data is from the request object, suitable for a Form's constructor
17
18
19 Repository
20 Each step has a reference to a shared repository (self.repo).
21 The repo is a key-value store that allows the steps to share data
22
23 Steps render based on the current state of the repo. For example, a step
24 may get information about each host the user said they want and ask for additional
25 input for each machine.
26 Because the steps render based on what is in the repo, a user can easily go back to
27 a previous step and change some data. This data will change in the repo and
28 affect later steps accordingly.
29
30 Everything stored in the repo is temporary. After a workflow has been completed, the repo
31 is translated into Django models and saved to the database.