Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

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

$
0
0

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!


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>