author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Fri, 18 Dec 2009 14:12:53 +0100 | |
changeset 4139 | 2718f2fd0576 |
parent 3363 | d3736311d0c4 |
child 4191 | 01638461d4b0 |
child 4212 | ab6573088b4a |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
1 |
"""cubicweb post creation script, set note's workflow |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
4 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
7 |
""" |
0 | 8 |
|
3363
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
9 |
wf = add_workflow(u'note workflow', 'Note') |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
10 |
todo = wf.add_state(u'todo', initial=True) |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
11 |
done = wf.add_state(u'done') |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
12 |
wf.add_transition(u'redoit', done, todo) |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
13 |
wf.add_transition(u'markasdone', todo, done) |
0 | 14 |
checkpoint() |
15 |
||
3363
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
16 |
wf = add_workflow(u'affaire workflow', 'Affaire') |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
17 |
pitetre = wf.add_state(u'pitetre', initial=True) |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
18 |
encours = wf.add_state(u'en cours') |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
19 |
finie = wf.add_state(u'finie') |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
20 |
bennon = wf.add_state(u'ben non') |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
21 |
wf.add_transition(u'abort', pitetre, bennon) |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
22 |
wf.add_transition(u'start', pitetre, encours) |
d3736311d0c4
update to 3.5 wf api
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
1977
diff
changeset
|
23 |
wf.add_transition(u'end', encours, finie) |
0 | 24 |
checkpoint() |
25 |