Hello dear community,
I think I found something strange in
https://svn.wso2.org/repos/wso2/branches/carbon/3.2.0/components/business-processes/bpel/org.wso2.carbon.bpel/3.2.0/src/main/java/org/wso2/carbon/bpel/ode/integration/mgt/services/ProcessManagementServiceSkeleton.java
public java.lang.String[] getAllProcesses(String getAllProcesses)
throws ProcessManagementException {
TenantProcessStoreImpl tenantProcessStore = getTenantProcessStore();
Set<QName> processIds = tenantProcessStore.getProcesses().keySet();
List<String> pids = new ArrayList<String>();
for(QName pid : processIds) {
pids.add(pid.toString());
}
return pids.toArray(new String[pids.size()]);
}
In this method the parameter getAllProcesses isn't use. So this method
can't conforme to it's definition of filtering over the status of the
parameter (ACTIVE/RETIRED/DISABLED).
Maybe this constraint should be forward to the
tenantProcessStore.getProcesses()
call.
May I suggest to change this function in a way similare to this :
public java.lang.String[] getAllProcesses(String getAllProcesses)
throws ProcessManagementException
{
final TenantProcessStoreImpl tenantProcessStore =
getTenantProcessStore();
final List<String> pids = new ArrayList<String>();
for(final Entry<QName,ProcessConfigurationImpl> entry :
tenantProcessStore.getProcesses().entrySet()) // map-filter
if (entry.getValue() != null &&
entry.getValue().getState() != null && // make sure ODE
process is sync with db
entry.getValue().getState().toString().equals(getAllProcesses) // Check
parameter filter.
)
pids.add(entry.getKey().toString());
return pids.toArray(new String[pids.size()]);
}
Regards,
Kévin.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev