Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi,
I have Change Activity object and I wanted to get the latest task name (e.g. Correct, Complete)
So, How I can do it like wise?
Try reading these two articles and see if they can help you
https://www.ptc.com/en/support/article/CS63595
https://www.ptc.com/it/support/article/CS106301
it helps to understand all change objects relation ships good start.
if you need to get Workflow task you need to use following API
snip:
WTChangeActivity2 changeActivity = (WTChangeActivity2) qr.nextElement();
QueryResult qrWorkItems = WorkflowHelper.service.getWorkItems(changeActivity); // you can use different types of object as a input. ChangeRequest changeNotice, WTPart what object can have workflow.
WorkItem workItem = (WorkItem) qrWorkItems.nextElement();
WfActivity wfactivity = (WfActivity) workItem.getSource().getObject();
String activityName = wfactivity.getName();
Hope that can help
Also check another thread object-identifier-for-workflow-object-in-Windchill
PetrH