Hi team,
I'm facing an issue when trying to update an existing workflow scheme via the REST API.
PUT https://api.atlassian.com/ex/jira/{cloudID}/rest/api/3/workflowscheme/{schemeId}
The request body is the standard workflow scheme update payload (including "updateDraftIfNeeded": true).
However, the API intermittently fails and returns the following error:
UpdateWorkflowScheme API failed. Error code [500], response:
{"message":"Cannot acquire workflow lock. There is a currently running workflow task: 1eb4c55f-c47d-49e5-a2a1-66ba647879b3","status-code":500,"stack-trace":""}
When I retry the same API request manually using Postman, it works fine.
It appears to fail only during automation when multiple workflow schemes are restored sequentially.
The target site looks like it's publishing workflow changes in the background when this error occurs.
Why does Jira return workflow lock / running workflow task during a normal workflow scheme update?
What is the correct way to handle this issue, so the update succeeds reliably?
Any guidance or best practice on how to avoid this lock error — or how to handle it properly would be really helpful.
Thank you,
Gopalakrishnan G
Hi @gopal guna
This indicates a problem with the workflow configuration or permissions.
Causes
Verify Workflow:
Check Permissions:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.