Skip to main content
1-Visitor
February 28, 2014
Question

How to get user's comments in the workflow activity by InfoEngine task?

  • February 28, 2014
  • 1 reply
  • 2465 views

Hi to all!

May be somebody have an example of task, that return the user's comments in the workflow activity?

Or which object cantain the comments attribute?

Thanks.

1 reply

1-Visitor
February 28, 2014

If you are open to use Java APIs, you may want to try something like below to get Routing History,


wt.fc.collections.WTArrayList auditCol = (wt.fc.collections.WTArrayList) wt.workflow.engine.WfEngineHelper.service.getVotingEvents((wt.workflow.engine.WfProcess)self.getObject(), null, null, null);
System.out.println("***Transition Expression: Audit = " + auditCol.toString());
java.util.Iterator auditEvents = auditCol.persistableIterator();
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());
comments += audit.getUserComment();
System.out.println("***Transition Expression: Complete Time = " + audit.getPersistInfo().getCreateStamp());
}
System.out.println("comments = " + comments);

1-Visitor
March 3, 2014

Thanks, Yogesh! It's not actually what I want, but I'll use it to solve my problem.