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

We are happy to announce the new Windchill Customization board! Learn more.

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

ptc-4896214
1-Newbie

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

Hi!

I need to check if the comment field is filled. I have this code, but it can only be used outside the transitions.

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

java.util.Iterator auditEvents = auditCol.persistableIterator();

comments= "";

while( auditEvents.hasNext()){

wt.workflow.engine.WfVotingEventAudit audit = (wt.workflow.engine.WfVotingEventAudit)auditEvents.next();

comentario = audit.getUserComment();

break;

}

if(comments.length() > 0){

throw new wt.util.WTException(new Throwable(new String("Você selecionou a opção Sem Comentário. O campo COMMENTS deve estar vazio!")));

}

Thanks!

0 REPLIES 0
Top Tags