Pradnya Mhatre
Pradnya Mhatre

Reputation: 21

How to get reviewer's name from status change object of a workflow transition?

How can I get the details of users for whom the state is intended?

In my case I have a 4-state workflow with private as initial state, then pending, reviewed and published. When a contributor adds a page its state is private and he can request for review. The reviewer then gets a notification email on the transition (I have added a Python script to send the mail).

Since Products.DCWorkflow has 5 default variables (action, actor, time, comments and review_history), I'm able to get the user who has requested the transition by using the actor variable:

actorid = wf_tool.getInfoFor(obj, 'actor')  
actor = context.portal_membership.getMemberById(actorid)

My problem is: how to get the details of the user who is going to review?

PS: my script works on status_change object of workflow.

Upvotes: 1

Views: 130

Answers (1)

Auspex
Auspex

Reputation: 2254

You can't get the name of the person who "is going to review" - it's not fixed until someone reviews. In a default setup, you could find the list of members of the Reviewers group through the Groups tool, and know who is authorized to review, but that's not the same thing.

Upvotes: 5

Related Questions