- Timestamp:
- 11 Jun 2011, 10:56:25 (14 years ago)
- Location:
- main/waeup.sirp/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/buildout.cfg
r6308 r6349 34 34 [versions] 35 35 collective.recipe.sphinxbuilder = 0.7.0 36 hurry.workflow = 0.1 036 hurry.workflow = 0.11 37 37 # Pinned to circumvent breakage in 0.4.x 38 38 hurry.zoperesource = 0.6 -
main/waeup.sirp/trunk/setup.py
r6287 r6349 13 13 'hurry.jquery', 14 14 'hurry.jqueryui', 15 'hurry.workflow ',15 'hurry.workflow >= 0.11', 16 16 # Add extra requirements here 17 17 'docutils', # For RST-processing... -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r6348 r6349 428 428 role_manager.assignRoleToPrincipal( 429 429 'waeup.PortalUser', self.request.principal.id) 430 state = IWorkflowState(self.context[pin]).getState() 431 if state == INITIALIZED: 432 IWorkflowInfo(self.context[pin]).fireTransition('start') 430 # XXX: disable for now. Pins will get a different workflow. 431 #state = IWorkflowState(self.context[pin]).getState() 432 #if state == INITIALIZED: 433 # IWorkflowInfo(self.context[pin]).fireTransition('start') 433 434 self.redirect(self.url(self.context[pin], 'edit')) 434 435 return … … 548 549 return '%s Application Form' % container_title 549 550 550 @property551 551 def getTransitions(self): 552 """XXX: need docs 553 """ 552 554 allowed_transitions_ids = IWorkflowInfo( 553 555 self.context).getManualTransitionIds() … … 599 601 600 602 def dataNotComplete(self): 601 #import pdb; pdb.set_trace()602 603 if not self.request.form.get('confirm_passport', False): 603 604 return 'Passport confirmation box not ticked.' -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/workflow.py
r6339 r6349 12 12 from waeup.sirp.interfaces import IObjectHistory 13 13 14 15 14 INITIALIZED = 'initialized' 16 15 STARTED = 'started' … … 19 18 NOT_ADMITTED = 'not admitted' 20 19 CREATED = 'created' 20 21 NULL_TRANSITION = Transition( 22 transition_id = '', 23 title = 'No transition', 24 source = None, 25 condition = NullCondition, 26 msg = '', 27 destination = None,) 21 28 22 29 def create_workflow(): … … 99 106 destination = STARTED) 100 107 101 return [ init_transition, start_transition, submit_transition,102 admit_transition, create_transition, refuse1_transition,103 refuse 2_transition, reset1_transition, reset2_transition,104 reset 3_transition, reset4_transition]108 return [NULL_TRANSITION, init_transition, start_transition, 109 submit_transition, admit_transition, create_transition, 110 refuse1_transition, refuse2_transition, reset1_transition, 111 reset2_transition, reset3_transition, reset4_transition] 105 112 106 113 … … 152 159 153 160 # Register global utilities for workflows and workflow versions... 154 grok.global_utility(ApplicationWorkflow, IWorkflow) 155 grok.global_utility(ApplicationWorkflowNullVersions, IWorkflowVersions) 161 #grok.global_utility(ApplicationWorkflow, IWorkflow, name=WORKFLOW_NAME) 162 #grok.global_utility(ApplicationWorkflowNullVersions, IWorkflowVersions, 163 # name=WORKFLOW_NAME) 156 164 157 class ApplicationState(grok.Adapter, WorkflowState): 165 application_workflow = ApplicationWorkflow() 166 167 class ApplicationWorkflowState(WorkflowState, grok.Adapter): 158 168 """An adapter to adapt Applicant objects to workflow states. 159 169 """ … … 161 171 grok.provides(IWorkflowState) 162 172 163 class ApplicationInfo(grok.Adapter, WorkflowInfo): 173 state_key = 'wf.application.state' 174 state_id = 'wf.application.id' 175 176 class ApplicationWorkflowInfo(WorkflowInfo, grok.Adapter): 164 177 """Adapter to adapt Applicant objects to workflow info objects. 165 178 """ … … 167 180 grok.provides(IWorkflowInfo) 168 181 182 def __init__(self, context): 183 self.context = context 184 self.wf = application_workflow 169 185 170 186 @grok.subscribe(IApplicantBaseData, IWorkflowTransitionEvent)
Note: See TracChangeset for help on using the changeset viewer.