
|
If you were logged in you would be able to see more operations.
|
Google issue summary
|
|
|
|
WAPI needs one or several methods to answer the following use case:
- every night, we need to find all current workflow tasks who have the property "expiration date" earlier than the current date.
To do that, we need to iterate on all tasks instances, but there's currently no method to do that.
|
|
Description
|
WAPI needs one or several methods to answer the following use case:
- every night, we need to find all current workflow tasks who have the property "expiration date" earlier than the current date.
To do that, we need to iterate on all tasks instances, but there's currently no method to do that.
|
Show » |
|
See WAPISample for an example of how to use it. Only work item due date filter are implemented right now.
http://svn.nuxeo.org/trac/nuxeo/browser/sandbox/nuxeo-api-sample/trunk/src/main/java/org/nuxeo/ecm/sample/workflow/WAPISample.java
>>>
WAPI wapi = WAPIBusinessDelegate.getWAPI();
Date deadline = new Date();
WMFilter filter = new WMFilterImpl(
WorkflowConstants.WORKFLOW_TASK_PROP_DUE_DATE, WMFilter.LT,
deadline);
WMWorkItemIterator it = wapi.listWorkItems(filter);
System.out.println("Number of items where due date is strictly before now :"
+ it.size());
filter = new WMFilterImpl(
WorkflowConstants.WORKFLOW_TASK_PROP_DUE_DATE, WMFilter.GT,
deadline);
it = wapi.listWorkItems(filter);
System.out.println("Number of items where due date is strictly after now :"
+ it.size());