cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to get Review Comments in workflow

RS_10128209
10-Marble

How to get Review Comments in workflow

RS_10128209_0-1700723840928.png

Hi All 

I want to get review comments and store it into a variable 

and it need to the person in task at the time of performing rework

 

Please suggest me how can I do

3 REPLIES 3

Hi @RS_10128209 

Same question has been answered today for voting so it is same.

here is example from a task

wt.fc.collections.WTArrayList auditCol = (wt.fc.collections.WTArrayList) wt.workflow.engine.WfEngineHelper.service.getVotingEvents((wt.workflow.engine.WfProcess) ((wt.workflow.work.WfAssignedActivity) self.getObject()).getParentProcess(), null, null, null);
System.out.println("***Transition Expression: Audit = " + auditCol.toString());

java.util.Iterator auditEvents = auditCol.persistableIterator();
String comments = "";
while (auditEvents.hasNext())
{
	wt.workflow.engine.WfVotingEventAudit audit = (wt.workflow.engine.WfVotingEventAudit) auditEvents.next();
	System.out.println("***Transition Expression: User vote = " + audit.getEventList());
	System.out.println("***Transition Expression: User comment = " + audit.getUserComment());
}

PetrH

Hey @HelesicPetr Thanks for the reply

 

My object is Disposition Action

Internal name is wt.change2.disposition.DispositionAction action = (wt.change2.disposition.DispositionAction)primaryBusinessObject;

RS_10128209_2-1700730183952.png

Pls refer screenshot highlighted comment I want to get 

 

Could you please tell what changes I need to made in above code which you shred

 

 

Hi @RS_10128209 

If the comment is from workflow you don't need to do any changes.

the comment is saved on the workflow event not the DispositionAction 

You just need to run the code from the workflow task, not the workflow robot. 

 

If you need to run the code from workflow robot, you need to change a first row

 

wt.fc.collections.WTArrayList auditCol = (wt.fc.collections.WTArrayList) wt.workflow.engine.WfEngineHelper.service.getVotingEvents((wt.workflow.engine.WfProcess)self.getObject(), null, null, null);

 

remove the .getParentProcess()

 

PetrH

Top Tags