Retrieve assigned tasks in batches

Posted by daniel.baciu on 12-Jan-2015 05:23

Hi,

I have a BPM diagram which from time to time it has a large amount of instances. I'm getting an error (something with -s) when I run GetAssignedTasks. Probably there are more tasks than the call can handle.

I try to use the filter objects thinking that these objects are used somehow by the server to filter the output. I created a BPM.Filter class to return first 10 tasks. It return true for first 10 comparisons and false for the rest but still i get the same error.

Is there a way to implement batching in GetAssignedTasks / GetAvailableTasks ?


Daniel.

All Replies

Posted by Lakshmi Padmaja on 13-Jan-2015 05:51

Hi Daniel,
 
I tried to get the Assginedworkitem list using query service where I have set FetchSize to 10. Please find the code below, Hope this helps .
 
 
 
QueryService qs = new QueryService(blsession);
QSWorkItem qswi = qs.getWorkItem();
QSWorkItemFilter qsWorkItemFilter = new QSWorkItemFilter("filterName","TestApp");  //Pass filter name and application name
qsWorkItemFilter.setUser("admin"); // Pass the username
qsWorkItemFilter.setFetchSize(10);
System.out.println(qsWorkItemFilter.getFetchSize()+"qsWorkItemFilter.getFetchSize()");
 
 
QSWorkItemRS rs = qs.getWorkItem().getAssignedList(qsWorkItemFilter);
System.out.println(rs.getSVOSize());
 
 
 
 
Regards,
Lakshmi
 
 
 
[collapse]
From: daniel.baciu [mailto:bounce-danielbaciu@community.progress.com]
Sent: Monday, January 12, 2015 4:54 PM
To: TU.BPM@community.progress.com
Subject: [Technical Users - BPM] Retrieve assigned tasks in batches
 
Thread created by daniel.baciu

Hi,

I have a BPM diagram which from time to time it has a large amount of instances. I'm getting an error (something with -s) when I run GetAssignedTasks. Probably there are more tasks than the call can handle.

I try to use the filter objects thinking that these objects are used somehow by the server to filter the output. I created a BPM.Filter class to return first 10 tasks. It return true for first 10 comparisons and false for the rest but still i get the same error.

Is there a way to implement batching in GetAssignedTasks / GetAvailableTasks ?


Daniel.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

This thread is closed