mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
MNT-17022 Errors in 5.1.1 when displaying any document linked to jBPM workflow
The getWorkflowsForContent method has been modified to catch the exception and return one less item in the list of workflows to be processed when the workflow is jBPM (or any other unregistered workflow - including future ones). It also logs a debug. For example: Workflow Component for engine id 'jbpm' is not registered. Ignored workflow on workspace://SpacesStore/a0afc2d8-01e4-4fa5-a3b0-08d91d1fda03 Having examined the the rest of WorkflowServiceImpl (and spoken to the original author), I don't believe there are other points in the code that we need worry about for the UI perspective, even though there are 22 other methods directly calling the method that throws the exception. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@135753 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1290,6 +1290,8 @@ public class WorkflowServiceImpl implements WorkflowService
|
||||
List<String> workflowIds = workflowPackageComponent.getWorkflowIdsForContent(packageItem);
|
||||
List<WorkflowInstance> workflowInstances = new ArrayList<WorkflowInstance>(workflowIds.size());
|
||||
for (String workflowId : workflowIds)
|
||||
{
|
||||
try
|
||||
{
|
||||
String engineId = BPMEngineRegistry.getEngineId(workflowId);
|
||||
WorkflowComponent component = getWorkflowComponent(engineId);
|
||||
@@ -1299,6 +1301,12 @@ public class WorkflowServiceImpl implements WorkflowService
|
||||
workflowInstances.add(instance);
|
||||
}
|
||||
}
|
||||
catch (WorkflowException componentForEngineNotRegistered)
|
||||
{
|
||||
String message = componentForEngineNotRegistered.getMessage();
|
||||
logger.debug(message + ". Ignored workflow on " + packageItem);
|
||||
}
|
||||
}
|
||||
return workflowInstances;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user