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

Re: How to get Workitem?

$
0
0

There are few method available in workflowhelper to get the workitem from PBO.below are the some methods you select based on your requirement.   

 

WorkflowHelper.service.getWorkItems( Persistable ,WTPrincipal , Role );

 

 

WorkflowHelper.service.getWorkItems(Persistable );

 

 

WorkflowHelper.service.getWorkItems(Persistable ,String);

 

 

WorkflowHelper.service.getWorkItems(Persistable ,String);

 

WorkflowHelper.service.getWorkItems(Persistable , WTPrincipal , String );

 

 

 

 

Example

          // get all all activity of the Approver role for given PBO (Promtion Request )

                              QueryResult workitems = WorkflowHelper.service.getWorkItems(PBO, Role.toRole("APPROVER_MANDATORY"));

 

                              while (workitems.hasMoreElements()) {

                                        WorkItem tmpworkitems = (WorkItem) workitems.nextElement();

                                        System.out.println("Inside WorkItems");

                                        workItemsVector.add(tmpworkitems);

                                        if (tmpworkitems.isComplete()) {

                                                  System.out.println("Workitem is completed ");

                                        } else {

                                                  System.out.println("Workitem is not completed ");

                                        }

 

 

                              }

 

hope 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>