mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ACE-3095 - Patch patch.eol-wcmwf fails if wf engine is disabled.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@87857 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -457,25 +457,33 @@ public class WorkflowDeployer extends AbstractLifecycleBean
|
||||
int undeployed = 0;
|
||||
for(String workflowName : workflowNames)
|
||||
{
|
||||
// Undeploy the workflow definition - all versions in JBPM
|
||||
List<WorkflowDefinition> defs = workflowService.getAllDefinitionsByName(workflowName);
|
||||
if(defs.size() > 0)
|
||||
String engineId = BPMEngineRegistry.getEngineId(workflowName);
|
||||
if (workflowAdminService.isEngineEnabled(engineId))
|
||||
{
|
||||
undeployed++;
|
||||
// Undeploy the workflow definition - all versions in JBPM
|
||||
List<WorkflowDefinition> defs = workflowService.getAllDefinitionsByName(workflowName);
|
||||
if(defs.size() > 0)
|
||||
{
|
||||
undeployed++;
|
||||
}
|
||||
for (WorkflowDefinition def: defs)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Undeploying workflow '" + workflowName + "' ...");
|
||||
}
|
||||
|
||||
workflowService.undeployDefinition(def.getId());
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("... undeployed '" + def.getId() + "' v" + def.getVersion());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (WorkflowDefinition def: defs)
|
||||
else
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Undeploying workflow '" + workflowName + "' ...");
|
||||
}
|
||||
|
||||
workflowService.undeployDefinition(def.getId());
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("... undeployed '" + def.getId() + "' v" + def.getVersion());
|
||||
}
|
||||
logger.debug("Workflow deployer: Definition '" + workflowName + "' cannot be undeployed as the '" + engineId + "' engine is disabled");
|
||||
}
|
||||
}
|
||||
return undeployed;
|
||||
|
Reference in New Issue
Block a user