public void undeploy(NodeRef nodeRef) { // Ignore if the node is a working copy if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_WORKING_COPY) == false) { String defName = (String)nodeService.getProperty(nodeRef, WorkflowModel.PROP_WORKFLOW_DEF_NAME); if (defName != null) { // Undeploy the workflow definition List<WorkflowDefinition> defs = workflowService.getAllDefinitionsByName(defName); for (WorkflowDefinition def: defs) { if (logger.isDebugEnabled()) logger.debug("Undeploying workflow '" + defName + "' ..."); workflowService.undeployDefinition(def.getId()); if (logger.isDebugEnabled()) logger.debug("... undeployed '" + def.getId() + "' v" + def.getVersion()); } } } else { if (logger.isDebugEnabled()) logger.debug("Workflow deployer: Definition '" + nodeRef + "' not undeployed since it is a working copy"); } }
public void undeploy(NodeRef nodeRef) { // Ignore if the node is a working copy if (nodeService.hasAspect(nodeRef, ContentModel.ASPECT_WORKING_COPY) == false) { String defName = (String)nodeService.getProperty(nodeRef, WorkflowModel.PROP_WORKFLOW_DEF_NAME); if (defName != null) { // Undeploy the workflow definition List<WorkflowDefinition> defs = workflowService.getAllDefinitionsByName(defName); for (WorkflowDefinition def: defs) { if (logger.isDebugEnabled()) logger.debug("Undeploying workflow '" + defName + "' ..."); workflowService.undeployDefinition(def.getId()); if (logger.isDebugEnabled()) logger.debug("... undeployed '" + def.getId() + "' v" + def.getVersion()); } } } else { if (logger.isDebugEnabled()) logger.debug("Workflow deployer: Definition '" + nodeRef + "' not undeployed since it is a working copy"); } }
workflowService.undeployDefinition(def.getId());
workflowService.undeployDefinition(def.getId());
workflowService.undeployDefinition(command[2]); currentWorkflowDef = null; currentPath = null; for (WorkflowDefinition def: defs) workflowService.undeployDefinition(def.getId()); out.print(" v" + def.getVersion());
workflowService.undeployDefinition(workflowDef.getId());
workflowService.undeployDefinition(command[2]); currentWorkflowDef = null; currentPath = null; for (WorkflowDefinition def: defs) workflowService.undeployDefinition(def.getId()); out.print(" v" + def.getVersion());
workflowService.undeployDefinition(workflowDef.getId());
assertEquals(1, defs.size()); workflowService.undeployDefinition(workflowDeployment.getDefinition().getId()); assertFalse(workflowService.isDefinitionDeployed(workflowNode));