Hi all,
I'm trying to retrieve the ProcessCollection data retrieved from the BPM OData service using filtering and sorting, but there are 3 things I could not get to work:
Use case 1:
I have created a SAPUI5 view of which i have bound the ProcessCollection entity set to a table, with an initial filter set on status. This works just fine, I see the correct results in my table
If I now try to filter on SAPUI5 table column 'Name', I get a 400 Bad Request error : Methods are not supported for filtering of process instances
The resulting request URI from the SAPUI5 table filter operation is:
/bpmodata/processes.svc/ProcessCollection?$skip=0&$top=110&$filter=(substringof('XYZ',Name)) and (Status eq 'IN_PROGRESS')
Any way to get this to work with SAPUI5?
(Since it's explicitly mentioned methods are not supported this is obviously not a bug, but I wouldn't call it a feature either )
Use case 2 (bug?):
I try to set the sort order on StartDate for the resultset, but this does not work.
Is sorting not implemented in the BPM OData service for ProcessCollections? Seems rather important to have at least sorting capabilities in an OData service...
Request URI for sorting:
/bpmodata/processes.svc/ProcessCollection?$skip=0&$top=110&$orderby=StartDate asc&$filter=Status eq 'IN_PROGRESS'
Use case 3 (bug?):
I tried to filter on StartDate property for ProcessCollection, but this does not seem to work either, despite the mention here that it should work: Filtering Processes
Repeatedly, I get a 400 Bad Request error : invalid filter expression
However, with other OData services, the below are quite valid filter expressions nonetheless
Request URI's I tried:
/bpmodata/processes.svc/ProcessCollection?$filter=datetimeoffset'2014-01-01T01:00:00Z',StartDate))
/bpmodata/processes.svc/ProcessCollection?$filter=(StartDate ge datetime'2014-01-01T01:00:00Z')
Of course, I could just load everything I need, store it in a SAPUI5 JSONModel and do all the sorting and filtering from the client, but honestly that bypasses the benefits of an OData service severely...
Any help in resolving either of these issues would be highly appreciated!
Best regards,
Robin