Created
September 29, 2010 15:45
-
-
Save jone/602987 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wtool = getToolByName(task, 'portal_workflow') | |
review_state = wtool.getInfoFor(task, 'review_state', None) | |
print 'XXX', review_state | |
if review_state == from_review_state: | |
mtool = getToolByName(task, 'portal_membership') | |
current_user_id = mtool.getAuthenticatedMember().getId() | |
wf_ids = wtool.getChainFor(task) | |
if wf_ids: | |
wf_id = wf_ids[0] | |
comment = 'Initial state after editing successor metadata.' | |
wtool.setStatusOf(wf_id, task, {'review_state': to_review_state, | |
'action' : to_review_state, | |
'actor': current_user_id, | |
'time': DateTime(), | |
'comments': comment,}) | |
task.reindexObject() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment