This page will be a guide on how to troubleshoot the Error converting XML to workflow.
When you upload or uninstall the Herzum Approval add-on or you run a re-index via the add-on administration screen, logs report the following error.
Error converting XML to workflow descriptor.: root cause: Attribute "type" with value "" must have a value from the list "AND OR " |
When navigating JIRA Workflows you don't display anyone of existing workflow.
The workflow descriptor can't be created because the xml structure isn't correct, the value of the attribute "type" in the tag "<conditions>" can't be empty.
The problem occurs when disabling, uninstalling,uploading the add-on after that a workflow has been updated by adding a condition after the Check Approval condition.
E.g.
All versions minor than "3.11.1-JIRA-7.0-7.3 " and "3.11-JIRA-6.0-6.4".
The next mayor version 4.0 (due date February 28,2017) will fix the bug.
The xml of the workflow descriptor is saved in the DB in jiraworkflows.descriptor and jiradraftworkflows.descriptor fields.
In order to fix the bug, in the fields above, each occurrence of the string 'conditions type=""' will be replaced with 'conditions type="AND"', because "AND" is default value.
Above the queries allowing to restore corrupted workflows across different databases:
UPDATE <<dbname>>.jiraworkflows set descriptor = REPLACE(descriptor, 'conditions type=""', 'conditions type="AND"'); UPDATE <<dbname>>.jiradraftworkflows set descriptor = REPLACE(descriptor, 'conditions type=""', 'conditions type="AND"'); commit; |
The query above was written in MySQL syntax, so you may need to tweak it depending on the database you are using. |