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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Return objects from custom task

ashishbhusa
13-Aquamarine

Return objects from custom task

I have written a custom task to fetch WTGroup objects belonging to a particular PDMLinkProduct. Following is the code that I have used:

 

 

QuerySpec qs = new QuerySpec(WTGroup.class);
qs.appendWhere(new SearchCondition(WTGroup.class, "containerReference.key.classname", SearchCondition.EQUAL, product.getPersistInfo().getObjectIdentifier().getClassname().toString()));
qs.appendAnd();
qs.appendWhere(new SearchCondition(WTGroup.class,"containerReference.key.id", SearchCondition.EQUAL, product.getPersistInfo().getObjectIdentifier().getId()), new int[] { 0 });
QueryResult qr = PersistenceHelper.manager.find(qs);

 

 

But I'm unable to return these fetched WTGroups in QueryResult using Return-Groups.

 

Does anyone know how to return these objects from the custom task?

0 REPLIES 0
Announcements

Top Tags