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

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

How to get Workflow task name from persistable object

Pushpak_Old
9-Granite

How to get Workflow task name from persistable object

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?

2 REPLIES 2

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

 

Marco

@Marco_Tosin 

it helps to understand all change objects relation ships good start.

 

@Pushpak_Old 

 

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  

Top Tags