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

Re: How to get "different tasks of a change process" of a change notice in code

$
0
0

Archana,

 

You can use below code to get more details

 

 

  while (status.hasMoreElements()) {

  Object obj = status.nextElement();

 

 

  String activityName = "";

  String assigne = "";

  String role = "";

  String comments = "";

  String vote = "";

  String actStatus = "";

  String completed = "";

  String start = "";

  String signature = "";

  String completedBy = "";

 

  if (obj.getClass().isAssignableFrom(WorkItem.class)) {

 

 

  WorkItem workitem = (WorkItem) obj;

  activityName = ((WfAssignedActivity) workitem.getSource().getObject()).getName();

  assigne = workitem.getOwnership().getOwner().getFullName();

  role = workitem.getRole().getDisplay();

  actStatus = new URLFactory().getHREF("/netmarkets/images/checked.gif");

 

 

  } else if (obj.getClass().isAssignableFrom(Element.class)) {

 

 

  continue;

 

 

  } else if (obj.getClass().isAssignableFrom(WfVotingEventAudit.class)) {

  WfVotingEventAudit wfVotingEventAudit = (WfVotingEventAudit) obj;

  activityName = wfVotingEventAudit.getActivityName();

  assigne = wfVotingEventAudit.getAssigneeRef().getFullName();

  role = ((wfVotingEventAudit.getRole() == null) ? "" : wfVotingEventAudit.getRole().getDisplay());

  comments = wfVotingEventAudit.getUserComment();

  vote = wfVotingEventAudit.getEventList().toString();

  actStatus = new URLFactory().getHREF("/netmarkets/images/checked.gif");

 

 

  DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");

 

 

  completed = ((wfVotingEventAudit.getTimestamp()) == null) ? "" : dateFormat.format(wfVotingEventAudit.getTimestamp());

 

 

  start = ((wfVotingEventAudit.getCreateTimestamp()) == null) ? "" : dateFormat.format(wfVotingEventAudit.getCreateTimestamp());

  completedBy=wfVotingEventAudit.getUserRef().getName();

  signature = getSignature((WTUser) wfVotingEventAudit.getUserRef().getObject());

 

 

  }

 

  }

 

let me know if this helps.

 

Thanks

Shreyas


Viewing all articles
Browse latest Browse all 8876

Trending Articles



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