Table of Contents

Class: MailFolderWorkflowManager MailFolderWorkflowManager.py

MailFolderWorkflowManager class.

Base Classes   
MailManagerSubstitutes
Methods   
__init__
_assignLocalRoles
_getFormerState
_getGroupMembers
_getIndex
_getWorkflowId
_insertPilots
_insertPrePilots
_isUserMemberOfGroup
_log
_removeLocalRoles
_updateLocalRoles
canAssign
canClose
canInitializeReply
canReject
canRejectValidate
canReset
canUnClose2assigning
canUnClose2validating
canUnClose2waiting
canUnClose2writing
canValidate
deleteAssigned
deleteAssociates
deletePreAssigned
deleteWatchers
doAssign
doClose
doInitializeReply
doModify
doPreAssign
doReinit
doReject
doRejectValidate
doUnClose
doValidate
freezeDelay
getAllAssigned
getAllAssignedMemberIds
getAllPreAssigned
getAllPreAssignedMemberIds
getAssociateMemberIds
getAssociates
getAssociatesSubstitutesExcluded
getCurrentLevel
getCurrentMemberRoles
getMergedAssignedTree
getPilotMemberIds
getPilots
getPilotsSubstitutesExcluded
getPrePilotMemberIds
getPrePilots
getPrePilotsSubstitutesExcluded
getWatcherMemberIds
getWatchers
getWatchersSubstitutesExcluded
unFreezeDelay
  __init__ 
__init__ ( self,  **kw )

Constructor

Init of the assignment lists. Will be checked through class methods with the guards. We need it cause we can't only manage that aspect with workflow based permissions.

  _assignLocalRoles 
_assignLocalRoles (
        self,
        member_id,
        role,
        context,
        )

Assign local roles to the given member_id.

Not on self cause we are in the repository but on the proxy.

  _getFormerState 
_getFormerState ( self,  context )

Return the former state.

Used to come back from the closing state to the former one.

  _getGroupMembers 
_getGroupMembers ( self,  group_id )

Returns the list of members given a group id

  _getIndex 
_getIndex (
        self,
        list=[],
        item=None,
        )

Return the index of an item in a list.

None if no index.

  _getWorkflowId 
_getWorkflowId ( self )

Returns the workflow the class is driving

  _insertPilots 
_insertPilots (
        self,
        left=0,
        right=0,
        id=None,
        context=None,
        )

Insert a pilot at a given position within the assignment tree.

  _insertPrePilots 
_insertPrePilots (
        self,
        left=0,
        right=0,
        id=None,
        context=None,
        )

Insert a pre pilot at a given position within the assignment tree.

  _isUserMemberOfGroup 
_isUserMemberOfGroup (
        self,
        member_id,
        group_id,
        )

Does a given member belong to a given group ?

  _log 
_log ( self )

DEBUG

  _removeLocalRoles 
_removeLocalRoles (
        self,
        member_id,
        context,
        )

Removing local roles to a givne member in a context

  _updateLocalRoles 
_updateLocalRoles (
        self,
        context,
        order=inc,
        )

Updating local roles while validating an aassignement

  canAssign 
canAssign ( self,  context=None )

Validate transition.

Will be possible to validate only if they're some people pre-affected and if you are a pilote or a Manager.

  canClose 
canClose ( self,  context=None )

Close transition

All pilots can do it.

  canInitializeReply 
canInitializeReply ( self,  context=None )

Initialize_reply transition guard

May be realized if you're a pilot or manager when the workflow is in an assigning state.

  canReject 
canReject ( self,  context=None )

Reject transition guard.

You can reject the assignement except if there's nobody above you.

  canRejectValidate 
canRejectValidate ( self )

Reject_validate transition guard

  canReset 
canReset ( self,  context=None )

Reset transition guard

Only the creator of the mail folder or the manager are allowed to do that

  canUnClose2assigning 
canUnClose2assigning ( self,  context=None )

unclose2assigning transition guard

From a close state to the assigning former state

  canUnClose2validating 
canUnClose2validating ( self,  context=None )

unclose2validating transition guard

For the close state to the validating former state

  canUnClose2waiting 
canUnClose2waiting ( self,  context=None )

unclose2waiting transition guard

From a close state to the waiting former state

  canUnClose2writing 
canUnClose2writing ( self,  context=None )

unclose2writing transition guard

From a close state to the writing former state

  canValidate 
canValidate ( self,  context=None )

Validate transition guard

May be possible to do that if you're a pilot or manager in a validating state and if you're not the latest having to validate.

  deleteAssigned 
deleteAssigned (
        self,
        www={},
        context=None,
        level=None,
        )

Delete the given assignes given their ids

Removing assignees from the assignees list and then removing the corresponding local role in the context.

  deleteAssociates 
deleteAssociates (
        self,
        www={},
        context=None,
        level=None,
        )

Deletes given associates give their ids

Removing associates from the associates list and then removing the corresponding local role in the context.

  deletePreAssigned 
deletePreAssigned (
        self,
        www={},
        context=None,
        level=None,
        )

Delete given pre-assigned given their ids

In this case, no need to remove local roles since they don't have any at that time.

  deleteWatchers 
deleteWatchers (
        self,
        www={},
        context=None,
        level=None,
        )

Deletes given watchers given their ids

Removing associates from the associates list and then removing the corresponding local role in the context.

  doAssign 
doAssign (
        self,
        context=None,
        comment='',
        )

Assign/confirm_assign transition

  doClose 
doClose (
        self,
        context=None,
        comment='',
        )

Close transition

Changing the mailfolder state to a closed one. As well, locking the sub objects to avoid them being modified. Notice, delay is frozen after that.

  doInitializeReply 
doInitializeReply ( self,  context=None )

Initialize_reply transition

  • Follow the transition - Create the out going mail document - Associates become watchers -> watchers nothing
  doModify 
doModify (
        self,
        context=None,
        comment='',
        )

Modify transition

Just for history.

  doPreAssign 
doPreAssign (
        self,
        www={},
        context=None,
        )

pre_assign transition

XXX dirty method -> refactoring

  doReinit 
doReinit (
        self,
        context=None,
        comment='',
        )

Reset transition

Re-init the workflow and all the parameters of the mailfolder. We keep the history, comments and all the documents inside the mailfolder.

  doReject 
doReject (
        self,
        context=None,
        comment='',
        )

Reject transition

  doRejectValidate 
doRejectValidate (
        self,
        context=None,
        comment='',
        )

Reject Validate transition

  • First, following the transition - Then, coping with assignment lists. - Then, local roles - Fixing associates list. - Incrementing level (going down again.)
  doUnClose 
doUnClose (
        self,
        context=None,
        comment='',
        )

Unclose transition

We gotta check the former state before the closing and then going back to this one through the corresponding transition. As well, the sub-contents will be unlocked. Notice, delay is not running anymore after that.

  doValidate 
doValidate (
        self,
        context=None,
        comment='',
        )

Validate transition

  1. - Call the validate transition 2 - Current level pilots become associates 3 - Decrementing the current level

Notice that if we are on the top of the hierarchy we'll close the mail folder and it will be the end of the process. (Meaning no more pilots to validate)

  freezeDelay 
freezeDelay ( self )

Freeze delay while closing the mailfolder

Will run again when the mailfolder will be re-open

  getAllAssigned 
getAllAssigned ( self,  level=None )

Return assigned member structs

Including Associates/Watchers (Conceptual)

  getAllAssignedMemberIds 
getAllAssignedMemberIds ( self,  level=None )

Return assigned member ids structs

Including Associates/Watchers (Conceptual)

  getAllPreAssigned 
getAllPreAssigned ( self,  level=None )

Returns pre assigned member structs

Including Assocites/Watchers (Conceptual)

  getAllPreAssignedMemberIds 
getAllPreAssignedMemberIds ( self,  level=None )

Returns pre assigned member id structs

Including Assocites/Watchers (Conceptual)

  getAssociateMemberIds 
getAssociateMemberIds ( self )

Get all the associate member ids

Order doesn't matter. Only at level 0 right now. No associate hierarchies

  getAssociates 
getAssociates ( self )

Get the associates

Order doesn't matter. Only at level 0 right now. No associate hierarchies

  getAssociatesSubstitutesExcluded 
getAssociatesSubstitutesExcluded ( self,  level=None )

Get the real associates. No substitutes

  getCurrentLevel 
getCurrentLevel ( self )

Returns the current workflow level

  getCurrentMemberRoles 
getCurrentMemberRoles ( self,  level=None )

Return the member roles in here as Strings.

Whatever pilots (and levels) / associates / watchers

  getMergedAssignedTree 
getMergedAssignedTree ( self )

Return the complete pilots tree of assignement.

It's a merge in between already assigned ones (validated ones) and the pre-assigned ones.

We add a flag to know if they are validated already

  getPilotMemberIds 
getPilotMemberIds ( self,  level=None )

Get the pilot member ids

We look inside the group members of they are

  getPilots 
getPilots ( self,  level=None )

Get the pilots

Order matters

  getPilotsSubstitutesExcluded 
getPilotsSubstitutesExcluded ( self,  level=None )

Get the real pilots. No substitutes

  getPrePilotMemberIds 
getPrePilotMemberIds ( self,  level=None )

Get the pre pilot member ids

We look inside the group members of they are

  getPrePilots 
getPrePilots ( self,  level=None )

Get the Pre-Pilots.

Order matters

  getPrePilotsSubstitutesExcluded 
getPrePilotsSubstitutesExcluded ( self,  level=None )

Get the real pre pilots. No substitutes

  getWatcherMemberIds 
getWatcherMemberIds ( self )

Get all the watcher member ids

Order doesn't matter. Only at level 0 right now. No associate hierarchies

  getWatchers 
getWatchers ( self )

Get the watchers

Order doesn't matter. Only at level 0 right now. No watcher hierarchies

  getWatchersSubstitutesExcluded 
getWatchersSubstitutesExcluded ( self,  level=None )

Get the real watchers. No substitutes

  unFreezeDelay 
unFreezeDelay ( self )

Un freeze delay while reopening the mailfolder

Then the delay run again.


Table of Contents

This document was automatically generated on Tue Mar 2 18:14:21 2004 by HappyDoc version WORKING