}
public List<ProcessInstanceRef> getProcessInstances(String definitionId)
{
String actualId = ModelAdaptor.decodeId(definitionId);
QName processQName = QName.valueOf(actualId);
//TODO: processQName.getLocalPart() includes the version number.
String instanceName = processQName.getLocalPart().substring(0, processQName.getLocalPart().indexOf("-"));
InstanceInfoListDocument result =
getMgmtFacade().listInstances( // filter, order, limit
"name="+ instanceName +" namespace=" + processQName.getNamespaceURI()+" status=active", "name", 1000);
return ModelAdaptor.adoptInstances(processQName, result);
}