Ignore:
Timestamp:
28 Nov 2014, 21:35:09 (10 years ago)
Author:
Henrik Bettermann
Message:

Implement application content components and rework workflows.

Location:
main/waeup.ikoba/trunk/src/waeup/ikoba/documents
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/utils.py

    r12088 r12089  
    2020import grok
    2121from waeup.ikoba.interfaces import MessageFactory as _
    22 from waeup.ikoba.documents.workflow import CREATED
     22from waeup.ikoba.interfaces import (
     23    CREATED, SUBMITTED,
     24    VERIFIED, REJECTED, EXPIRED)
    2325from waeup.ikoba.documents.interfaces import IDocumentsUtils
    24 from waeup.ikoba.documents.workflow import (
    25     CREATED, SUBMITTED,
    26     VERIFIED, REJECTED, OUTDATED)
    2726
    2827
     
    4241        VERIFIED: _('verified'),
    4342        REJECTED: _('rejected'),
    44         OUTDATED:_('outdated')
     43        EXPIRED:_('expired')
    4544        }
  • main/waeup.ikoba/trunk/src/waeup/ikoba/documents/workflow.py

    r12053 r12089  
    2525from waeup.ikoba.interfaces import (
    2626    IObjectHistory, IIkobaWorkflowInfo,
    27     SimpleIkobaVocabulary)
     27    SimpleIkobaVocabulary,
     28    CREATED, SUBMITTED, VERIFIED, REJECTED, EXPIRED)
    2829from waeup.ikoba.interfaces import MessageFactory as _
    2930from waeup.ikoba.workflow import IkobaWorkflow, IkobaWorkflowInfo
     
    3132from waeup.ikoba.documents.interfaces import IDocument
    3233
    33 CREATED = 'created'
    34 SUBMITTED = 'submitted'
    35 VERIFIED = 'verified'
    36 REJECTED = 'rejected'
    37 OUTDATED = 'outdated'
     34IMPORTABLE_STATES = (CREATED, SUBMITTED, VERIFIED, REJECTED, EXPIRED)
    3835
    39 IMPORTABLE_STATES = (CREATED, SUBMITTED, VERIFIED, REJECTED)
    40 
    41 REGISTRATION_TRANSITIONS = (
     36VERIFICATION_TRANSITIONS = (
    4237    Transition(
    4338        transition_id = 'create',
     
    7166    Transition(
    7267        transition_id = 'reset1',
    73         title = _('Reset'),
     68        title = _('Reset to initial state'),
    7469        msg = _('Reset to initial state'),
    7570        source = REJECTED,
     
    7873    Transition(
    7974        transition_id = 'reset2',
    80         title = _('Reset'),
     75        title = _('Reset to initial state'),
    8176        msg = _('Reset to initial state'),
    8277        source = VERIFIED,
     
    8580    Transition(
    8681        transition_id = 'reset3',
    87         title = _('Reset'),
     82        title = _('Reset to initial state'),
    8883        msg = _('Reset to initial state'),
    8984        source = SUBMITTED,
     
    9186
    9287    Transition(
    93         transition_id = 'outdate',
    94         title = _('Set to outdated'),
    95         msg = _('Set to outdated'),
     88        transition_id = 'expire',
     89        title = _('Set to expired'),
     90        msg = _('Set to expired'),
    9691        source = VERIFIED,
    97         destination = OUTDATED),
     92        destination = EXPIRED),
     93
     94    Transition(
     95        transition_id = 'reset4',
     96        title = _('Reset to initial state'),
     97        msg = _('Reset to initial state'),
     98        source = EXPIRED,
     99        destination = CREATED),
    98100    )
    99101
    100102
    101 IMPORTABLE_TRANSITIONS = [i.transition_id for i in REGISTRATION_TRANSITIONS]
     103IMPORTABLE_TRANSITIONS = [i.transition_id for i in VERIFICATION_TRANSITIONS]
    102104
    103 verification_workflow = IkobaWorkflow(REGISTRATION_TRANSITIONS)
     105verification_workflow = IkobaWorkflow(VERIFICATION_TRANSITIONS)
    104106
    105107class VerificationWorkflowState(WorkflowState, grok.Adapter):
Note: See TracChangeset for help on using the changeset viewer.