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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Return objects from custom task

ashishbhusa
12-Amethyst

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
Top Tags