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
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
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;
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
@HelesicPetr wrote: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
If in case we are using utility and taking pbo as a parameter in helper class then how to get that comment?
If possible you can share snap of java code.
i got the other details like role , owner, activity name etc only "comment" I am not getting.