mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ACE-2171 - EOL: WCM and related JBPM workflow definition removal
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@87752 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -452,6 +452,35 @@ public class WorkflowDeployer extends AbstractLifecycleBean
|
||||
}
|
||||
}
|
||||
|
||||
public int undeploy(List<String> workflowNames)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
return undeployed;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBootstrap(ApplicationEvent event)
|
||||
{
|
||||
|
Reference in New Issue
Block a user