1 | <?xml version="1.0"?>
|
---|
2 | <cps-workflow workflow_id="workspace_folder_wf"
|
---|
3 | title="CPS Workflow Definition"
|
---|
4 | state_variable="review_state"
|
---|
5 | meta_type="CPS Workflow">
|
---|
6 | <permission>View</permission>
|
---|
7 | <state state_id="work" title="Work">
|
---|
8 | <exit-transition transition_id="create_content"/>
|
---|
9 | <exit-transition transition_id="cut_copy_paste"/>
|
---|
10 | <exit-transition transition_id="modify"/>
|
---|
11 | <exit-transition transition_id="translate"/>
|
---|
12 | <exit-transition transition_id="delete_translation"/>
|
---|
13 | <permission-map name="View" acquired="False">
|
---|
14 | <permission-role>Manager</permission-role>
|
---|
15 | <permission-role>WorkspaceManager</permission-role>
|
---|
16 | <permission-role>WorkspaceMember</permission-role>
|
---|
17 | <permission-role>WorkspaceReader</permission-role>
|
---|
18 | </permission-map>
|
---|
19 | </state>
|
---|
20 | <transition transition_id="create" title="Initial creation"
|
---|
21 | new_state="work" trigger="USER"
|
---|
22 | before_script="" after_script="">
|
---|
23 |
|
---|
24 | <guard>
|
---|
25 | <guard-role>Manager</guard-role>
|
---|
26 | <guard-role>WorkspaceManager</guard-role>
|
---|
27 | <guard-role>WorkspaceMember</guard-role>
|
---|
28 | </guard>
|
---|
29 | <transition-behavior behavior_id="initial-create"/>
|
---|
30 | </transition>
|
---|
31 | <transition transition_id="create_content"
|
---|
32 | title="Create content" new_state="work"
|
---|
33 | trigger="USER" before_script="" after_script="">
|
---|
34 |
|
---|
35 | <guard>
|
---|
36 | <guard-role>Manager</guard-role>
|
---|
37 | <guard-role>WorkspaceManager</guard-role>
|
---|
38 | <guard-role>WorkspaceMember</guard-role>
|
---|
39 | </guard>
|
---|
40 | <transition-behavior behavior_id="allow-sub-create"/>
|
---|
41 | <transition-behavior behavior_id="allow-sub-checkout"/>
|
---|
42 | </transition>
|
---|
43 | <transition transition_id="cut_copy_paste"
|
---|
44 | title="Cut/Copy/Paste" new_state=""
|
---|
45 | trigger="USER" before_script="" after_script="">
|
---|
46 |
|
---|
47 | <guard>
|
---|
48 | <guard-role>Manager</guard-role>
|
---|
49 | <guard-role>WorkspaceManager</guard-role>
|
---|
50 | <guard-role>WorkspaceMember</guard-role>
|
---|
51 | </guard>
|
---|
52 | <transition-behavior behavior_id="allow-sub-move"/>
|
---|
53 | <transition-behavior behavior_id="allow-sub-delete"/>
|
---|
54 | <transition-behavior behavior_id="allow-sub-copy"/>
|
---|
55 | </transition>
|
---|
56 | <transition transition_id="delete_translation"
|
---|
57 | title="Delete a translation" new_state=""
|
---|
58 | trigger="USER"
|
---|
59 | before_script="delete_language_from_proxy"
|
---|
60 | after_script="">
|
---|
61 |
|
---|
62 | <guard>
|
---|
63 | <guard-permission>Modify portal content</guard-permission>
|
---|
64 | <guard-expression>python:not state_change.object.isDefaultLanguage()</guard-expression>
|
---|
65 | </guard>
|
---|
66 | </transition>
|
---|
67 | <transition transition_id="modify" title="Edit content"
|
---|
68 | new_state="" trigger="USER" before_script=""
|
---|
69 | after_script="">
|
---|
70 | <description>This transition provides a specific entry in status history</description>
|
---|
71 |
|
---|
72 | <guard>
|
---|
73 | <guard-role>Manager</guard-role>
|
---|
74 | <guard-role>Owner</guard-role>
|
---|
75 | <guard-role>WorkspaceManager</guard-role>
|
---|
76 | <guard-role>WorkspaceMember</guard-role>
|
---|
77 | </guard>
|
---|
78 | </transition>
|
---|
79 | <transition transition_id="translate"
|
---|
80 | title="Add translation" new_state=""
|
---|
81 | trigger="USER"
|
---|
82 | before_script="add_language_to_proxy"
|
---|
83 | after_script="">
|
---|
84 |
|
---|
85 | <guard>
|
---|
86 | <guard-permission>Modify portal content</guard-permission>
|
---|
87 | </guard>
|
---|
88 | </transition>
|
---|
89 | <script script_id="add_language_to_proxy"
|
---|
90 | type="Script (Python)"
|
---|
91 | filename="workflows/workspace_folder_wf/scripts/add_language_to_proxy.py"/>
|
---|
92 | <script script_id="delete_language_from_proxy"
|
---|
93 | type="Script (Python)"
|
---|
94 | filename="workflows/workspace_folder_wf/scripts/delete_language_from_proxy.py"/>
|
---|
95 | </cps-workflow>
|
---|