Answer by rickett (14292) | Jan 02, 2017 at 01:56 PM
The getCurrentApprovers() call should be invoked on the content or document passed in to the custom action in the execute(Document p_document) method.
Only this object would contain the approvers for the current stage. In one case the customer was not using this object. Instead they were using the object which was retrieved from the repository using the inWorkspace.getById() call (in WorkflowUtil class). The object retrieved from the repository would be the one from the previous save and hence it would contain all information for the first stage.
General process/pseudo code:
Get the docId of the content passed to the customer action
Create a new Workspace
Set to use DN
Content myContent =(Content)ws.getById(thisId);
String approvers = myContent.getCurrentApprovers();
Error using WCM API IWKWC0010W Unauthorized access by {PrincipalInformation: {dn: anonymous_user 1 Answer
WCM API Sample Code to render Authoring Tools Component from a JSP using tag library 1 Answer
staleValueException using WCM API from an EJB 1 Answer
WCM API considerations when calling endWorkspace() 1 Answer
WCM API sample code to clear versions with custom utility 1 Answer