more than one draft workflows associated with the workflow named

As the title indicates, when trying to delete a workflow named "Project Tracker Test Workflow V2.0" I get an error as show below. Note that I have purged the system of all inactive workflow schemes,and inactive workflows. I have reindexed the system and run the integrity checker as well. I cannot seem to find this offending workflow anywhere. Any guidance would be helpful


com.atlassian.cache.CacheException: java.lang.IllegalStateException: There are more than one draft workflows associated with the workflow named 'Project Tracker Test Workflow V2.0'

        at com.atlassian.cache.memory.DelegatingCache$DelegatingLoadingCache.get(

        at com.atlassian.jira.workflow.CachingDraftWorkflowStore.getDraftWorkflow(

        at com.atlassian.jira.workflow.OSWorkflowManager.getDraftWorkflow(

        at com.atlassian.jira.workflow.OSWorkflowManager.deleteDraftWorkflow(

        at com.atlassian.jira.workflow.OSWorkflowManager.deleteWorkflow(

        at com.atlassian.jira.bc.workflow.DefaultWorkflowService.deleteWorkflow(

        at com.atlassian.jira.web.action.admin.workflow.ListWorkflows.doDeleteWorkflow(

        at sun.reflect.GeneratedMethodAccessor773.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(

        at java.lang.reflect.Method.invoke(

        at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(

        at webwork.util.InjectionUtils.invoke(

        at webwork.action.ActionSupport.invokeCommand(

        at webwork.action.ActionSupport.execute(

        at com.atlassian.jira.action.JiraActionSupport.execute(

        at webwork.interceptor.DefaultIntercep



4 answers

1 vote
Vasiliy Zverev Community Champion Feb 18, 2016

It seems to be a hardcore question. 

Here is an SQL statement to get count of draft workflows. Try to execute it and find any records where count > 1

	, count (jiraworkflows.workflowname)
	join jiradraftworkflows	on	jiraworkflows.workflowname = jiradraftworkflows.PARENTNAME
group by
order by
	count (jiraworkflows.workflowname) desc

Vasiliy, if I do find a record with a count > 1 is it safe to get rid of that record ?


Vasiliy Zverev Community Champion Feb 23, 2016

Here is a script to delete a draft workflow related to spesified WF name. 

I recommend to run it first on test instance becauce it is a not standart case.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.workflow.JiraWorkflow
import com.atlassian.jira.workflow.WorkflowManager

 * Delte draft workflow
WorkflowManager workflowManager = ComponentAccessor.getWorkflowManager()
JiraWorkflow workflow = workflowManager.getWorkflow(workflowManager.getWorkflow("WorkflowName"))

workflowManager.deleteWorkflow( workflowManager.getDraftWorkflow(workflow.getName()))
0 votes
Vasiliy Zverev Community Champion Feb 18, 2016

Try to do integrity check at first. See this:

I've tried re-indexing and the integrity checks to no avail

It's happened to me a couple of times as well..

I would attempt the following:

  1. Export the problematic workflow
  2. Import it again using a new name
  3. Replace the old workflow with the new one in the active schemes
  4. Delete the old workflow

Hope this helps.

In case you can recreate the same problem again, open a support request with Atlassian & submit the steps to reproduce.




Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,938 views 19 22
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you