Search code examples
intellij-idea

Intellij not recognising xml for bpmn


This just started to happen out of no where. I have an existing Activiti project. I have the Activiti BPMN Visualizer plugin installed. Now in every one of my .bpmn20.xml files, Idea is saying "element x must be declared" or "cannot resolve symbol" Here is an example:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn"
         xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
         xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
         typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath"
         targetNamespace="http://www.activiti.org/processdef">
<process id="test" name="test" isExecutable="true">
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_test">
    <bpmndi:BPMNPlane bpmnElement="test" id="BPMNPlane_test">
    </bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>

the tags for definitions and process are showing red, with errors in the problems tab. The namespaced tags, bpmndi:BPMNDiagram for example, are fine. What has happened and how do I fix it?


Solution

  • If it happens out of nowhere try to invalidate the cache and restart the ide.