Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 436)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml	(revision 449)
@@ -4,5 +4,53 @@
               state_variable="review_state"
               meta_type="CPS Workflow">
+ <permission>Modify portal content</permission>
  <permission>View</permission>
+ <state state_id="admission_pin_entered" title="">
+  <exit-transition transition_id="request_admission"/>
+ </state>
+ <state state_id="admission_rejected" title="">
+  <exit-transition transition_id="finally_reject"/>
+ </state>
+ <state state_id="admission_requested" title="">
+  <exit-transition transition_id="pume_fail"/>
+  <exit-transition transition_id="pume_pass"/>
+ </state>
+ <state state_id="admitted" title="">
+  <exit-transition transition_id="enter_clearance_pin"/>
+ </state>
+ <state state_id="clearance_pin_entered" title="">
+  <exit-transition transition_id="request_clearence"/>
+ </state>
+ <state state_id="cleared_and_validated" title="">
+ </state>
+ <state state_id="clearence_requested" title="">
+  <exit-transition transition_id="clear_and_validate"/>
+  <exit-transition transition_id="reject_clearance"/>
+ </state>
+ <state state_id="closed" title="">
+  <exit-transition transition_id="open"/>
+ </state>
+ <state state_id="created" title="">
+  <exit-transition transition_id="enter_admission_pin"/>
+  <exit-transition transition_id="open"/>
+  <permission-map name="Modify portal content"
+                  acquired="False">
+   <permission-role>Manager</permission-role>
+   <permission-role>SectionManager</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+  </permission-map>
+ </state>
+ <state state_id="finally_rejected" title="">
+ </state>
+ <state state_id="opened" title="">
+  <exit-transition transition_id="close"/>
+  <permission-map name="Modify portal content"
+                  acquired="True">
+   <permission-role>Owner</permission-role>
+  </permission-map>
+  <permission-map name="View" acquired="True">
+  </permission-map>
+ </state>
  <state state_id="pume_failed" title="">
   <exit-transition transition_id="finally_reject"/>
@@ -12,65 +60,50 @@
   <exit-transition transition_id="reject_admission"/>
  </state>
- <state state_id="admission_pin_entered" title="">
-  <exit-transition transition_id="request_admission"/>
- </state>
- <state state_id="admission_rejected" title="">
-  <exit-transition transition_id="finally_reject"/>
- </state>
- <state state_id="admission_requested" title="">
-  <exit-transition transition_id="pume_fail"/>
-  <exit-transition transition_id="pume_pass"/>
- </state>
- <state state_id="admitted" title="">
-  <exit-transition transition_id="enter_clearance_pin"/>
- </state>
- <state state_id="clearance_pin_entered" title="">
-  <exit-transition transition_id="request_clearence"/>
- </state>
- <state state_id="cleared_and_validated" title="">
- </state>
- <state state_id="clearence_requested" title="">
-  <exit-transition transition_id="clear_and_validate"/>
-  <exit-transition transition_id="reject_clearance"/>
- </state>
- <state state_id="finally_rejected" title="">
- </state>
- <state state_id="sleeping_mode" title="">
-  <exit-transition transition_id="enter_admission_pin"/>
- </state>
- <transition transition_id="pume_fail" title=""
-             new_state="pume_failed" trigger="USER"
-             before_script="" after_script="">
-  
-  <guard>
-  </guard>
- </transition>
- <transition transition_id="pume_pass" title=""
-             new_state="pume_passed" trigger="USER"
-             before_script="" after_script="">
-  
-  <guard>
-  </guard>
- </transition>
+ <state state_id="rejected" title="">
+ </state>
  <transition transition_id="admit" title=""
              new_state="admitted" trigger="USER"
-             before_script="" after_script="">
-  
-  <guard>
-  </guard>
-  <transition-behavior behavior_id="initial-create"/>
+             before_script="" after_script="open_clearance">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
  </transition>
  <transition transition_id="clear_and_validate" title=""
              new_state="cleared_and_validated"
-             trigger="USER" before_script="" after_script="">
-  
-  <guard>
-  </guard>
+             trigger="USER" before_script=""
+             after_script="open_personal">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="close" title=""
+             new_state="closed" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="create" title=""
+             new_state="created" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+  <transition-behavior behavior_id="initial-create"/>
  </transition>
  <transition transition_id="enter_admission_pin" title=""
              new_state="admission_pin_entered"
-             trigger="USER" before_script="" after_script="">
-  
-  <guard>
+             trigger="USER" before_script=""
+             after_script="open_admission">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
   </guard>
  </transition>
@@ -89,4 +122,34 @@
   </guard>
  </transition>
+ <transition transition_id="open" title=""
+             new_state="opened" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <transition transition_id="pume_fail" title=""
+             new_state="pume_failed" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+ </transition>
+ <transition transition_id="pume_pass" title=""
+             new_state="pume_passed" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+ </transition>
+ <transition transition_id="reject" title=""
+             new_state="rejected" trigger="USER"
+             before_script="" after_script="">
+  
+  <guard>
+  </guard>
+ </transition>
  <transition transition_id="reject_admission" title=""
              new_state="admission_rejected" trigger="USER"
@@ -98,22 +161,41 @@
  <transition transition_id="reject_clearance" title=""
              new_state="clearance_pin_entered"
-             trigger="USER" before_script="" after_script="">
-  
-  <guard>
+             trigger="USER" before_script="open_clearance"
+             after_script="">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
   </guard>
  </transition>
  <transition transition_id="request_admission" title=""
              new_state="admission_requested" trigger="USER"
-             before_script="" after_script="">
-  
-  <guard>
+             before_script="" after_script="close_admission">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
   </guard>
  </transition>
  <transition transition_id="request_clearence" title=""
              new_state="clearence_requested" trigger="USER"
-             before_script="" after_script="">
-  
-  <guard>
-  </guard>
- </transition>
+             before_script="" after_script="close_clearance">
+  
+  <guard>
+   <guard-role>Manager</guard-role>
+   <guard-role>SectionManager</guard-role>
+  </guard>
+ </transition>
+ <script script_id="close_admission" type="Script (Python)"
+         filename="workflows/waeup_student_wf/scripts/close_admission.py"/>
+ <script script_id="close_clearance" type="Script (Python)"
+         filename="workflows/waeup_student_wf/scripts/close_clearance.py"/>
+ <script script_id="close_personal" type="Script (Python)"
+         filename="workflows/waeup_student_wf/scripts/close_personal.py"/>
+ <script script_id="open_admission" type="Script (Python)"
+         filename="workflows/waeup_student_wf/scripts/open_admission.py"/>
+ <script script_id="open_clearance" type="Script (Python)"
+         filename="workflows/waeup_student_wf/scripts/open_clearance.py"/>
+ <script script_id="open_personal" type="Script (Python)"
+         filename="workflows/waeup_student_wf/scripts/open_personal.py"/>
 </cps-workflow>
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_admission.py
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_admission.py	(revision 449)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_admission.py	(revision 449)
@@ -0,0 +1,22 @@
+## Script (Python) "close_admission"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# Example code:
+
+# Import a standard function, and get the HTML request and response objects.
+from Products.PythonScripts.standard import html_quote
+request = container.REQUEST
+RESPONSE =  request.RESPONSE
+
+# Return a string identifying this script.
+print "This is the", script.meta_type, '"%s"' % script.getId(),
+if script.title:
+    print "(%s)" % html_quote(script.title),
+print "in", container.absolute_url()
+return printed
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_clearance.py
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_clearance.py	(revision 449)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_clearance.py	(revision 449)
@@ -0,0 +1,22 @@
+## Script (Python) "close_clearance"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# Example code:
+
+# Import a standard function, and get the HTML request and response objects.
+from Products.PythonScripts.standard import html_quote
+request = container.REQUEST
+RESPONSE =  request.RESPONSE
+
+# Return a string identifying this script.
+print "This is the", script.meta_type, '"%s"' % script.getId(),
+if script.title:
+    print "(%s)" % html_quote(script.title),
+print "in", container.absolute_url()
+return printed
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_personal.py
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_personal.py	(revision 449)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/close_personal.py	(revision 449)
@@ -0,0 +1,22 @@
+## Script (Python) "close_personal"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# Example code:
+
+# Import a standard function, and get the HTML request and response objects.
+from Products.PythonScripts.standard import html_quote
+request = container.REQUEST
+RESPONSE =  request.RESPONSE
+
+# Return a string identifying this script.
+print "This is the", script.meta_type, '"%s"' % script.getId(),
+if script.title:
+    print "(%s)" % html_quote(script.title),
+print "in", container.absolute_url()
+return printed
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_admission.py
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_admission.py	(revision 449)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_admission.py	(revision 449)
@@ -0,0 +1,22 @@
+## Script (Python) "open_admission"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# Example code:
+
+# Import a standard function, and get the HTML request and response objects.
+from Products.PythonScripts.standard import html_quote
+request = container.REQUEST
+RESPONSE =  request.RESPONSE
+
+# Return a string identifying this script.
+print "This is the", script.meta_type, '"%s"' % script.getId(),
+if script.title:
+    print "(%s)" % html_quote(script.title),
+print "in", container.absolute_url()
+return printed
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_clearance.py
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_clearance.py	(revision 449)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_clearance.py	(revision 449)
@@ -0,0 +1,22 @@
+## Script (Python) "open_clearance"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# Example code:
+
+# Import a standard function, and get the HTML request and response objects.
+from Products.PythonScripts.standard import html_quote
+request = container.REQUEST
+RESPONSE =  request.RESPONSE
+
+# Return a string identifying this script.
+print "This is the", script.meta_type, '"%s"' % script.getId(),
+if script.title:
+    print "(%s)" % html_quote(script.title),
+print "in", container.absolute_url()
+return printed
Index: WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_personal.py
===================================================================
--- WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_personal.py	(revision 449)
+++ WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/scripts/open_personal.py	(revision 449)
@@ -0,0 +1,22 @@
+## Script (Python) "open_personal"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# Example code:
+
+# Import a standard function, and get the HTML request and response objects.
+from Products.PythonScripts.standard import html_quote
+request = container.REQUEST
+RESPONSE =  request.RESPONSE
+
+# Return a string identifying this script.
+print "This is the", script.meta_type, '"%s"' % script.getId(),
+if script.title:
+    print "(%s)" % html_quote(script.title),
+print "in", container.absolute_url()
+return printed
