Hi,
We have a requirement where we need to generate report based on Statuses READY, IN_PROGRESS, RESERVED tasks.
I have below code, which is not giving the READY task.
TaskAbstractQueryCriteria c2 = new TaskAbstractStatusCriteria(Status.READY);
TaskAbstractQueryCriteria c3 = new TaskAbstractStatusCriteria(Status.RESERVED);
TaskAbstractQueryCriteria c4 = new TaskAbstractStatusCriteria(Status.IN_PROGRESS);
QueryResultParameters qrp = new QueryResultParameters();
qrp.setFirstResult(0);
List<TaskAbstract> lstTaskAbstract = taskInstanceManager.getTaskAbstractsByLogonID(usrKey, qrp, c2, c3, c4);
A task can be assigned to more than one person, how can getTaskAbstractsByLogonID() will behave when the task status is in READY.
If the above code gives READY tasks, my problem resolves.
Another approach...
Get all the running processes instance Ids and from there using taskInstanceManager.getTaskAbstractsByParent(processInstanceId, statuses) this, we can achieve.
But using the below code I am getting only the activeProcess.
ProcessDefinitionManager proDefManager = BPMFactory.getProcessDefinitionManager();
ProcessDefinition proDefinition = proDefManager.getActiveProcessDefinition("Vendor", "DC Name", "Process Name");
Collection<ProcessInstance> proInstCollection = proInstanceManager.getRunningProcessInstances(proDefinition.getId());
But I need all the running process, the way they show in NWA, irrespective of active or inactive(because of some changes process might have deployed, then previous process will become inactive) using api.
Any help is appreciated.
Thanks