Hello experts,
i am building a custom BPM Reporting framework using SAPUI5, RESTFul Services and the BPM Reporting Java API. Right now i am facing the problem that i can't access the Process Instance Ids of completed processes.
The API is offering a method to get all RUNNING process instances for a specific definition by using:
ProcessInstanceManager processInstanceManager = BPMFactory.getProcessInstanceManager();
Set<ProcessInstance> piSet = processInstanceManager.getRunningProcessInstances(URI processDefinitionId);
So this gives me a set of all process instances with the state RUNNING or ERROR. But how do i get the rest of the instances with the state COMPLETED?
I need a list of all instances for specific process since i want to use the query method of ReportingDataSourceManager to get the reporting results, and this method requieres a list of process instances to query...
ReportingDataSourceManager pDSManager = BPMFactory.getReportingDataSourceManager();
ReportingResultSet pResultSet = pDSManager.query(uDatasource, Set<ProcessInstance> piSet);
I know the instances are there since you can look them up in NWA. But it seems the public API offering only to look up the Running instances? Is there any other API i could use or any workaround for this?
Seems a bit off to have a reporting API for only running instances....
Thank you for your help!