cancel
Showing results for 
Search instead for 
Did you mean: 

Create of BPMN XML failed...

joselouro
Champ in-the-making
Champ in-the-making
Hi,

I've been doing some tests to create a small PoC.
I've modelled a small process on Eclipse (Activiti Designer) and it was exported from Eclipse and imported on Explorer.

While trying to deploy it, I got "Create of BPMN XML failed. Error parsing XML"…

Anyone can give me a clue about what is wrong ?

Thanks…

Here is the code:
<code>
<?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:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="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/test">
  <process id="TechSample" name="TechSample" isExecutable="true" activiti:candidateStarterGroups="BPM@EC">
    <startEvent id="st01" name="Start" activiti:initiator="initiator"></startEvent>
    <userTask id="usertask1" name="Fill Request" activiti:assignee="${initiator}">
      <extensionElements>
        <activiti:formProperty id="sSubject" name="Subject" type="string" variable="${sSubject}" required="true"></activiti:formProperty>
        <activiti:formProperty id="sDescription" name="Description" type="string" variable="${sDescription}" required="true"></activiti:formProperty>
        <activiti:formProperty id="sOpinion" name="Opinion" type="string" variable="${sOpinion}"></activiti:formProperty>
        <activiti:formProperty id="assignee" name="Assignees" type="string" variable="${assignee}" writable="false" required="true"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow1" sourceRef="st01" targetRef="usertask1"></sequenceFlow>
    <userTask id="usertask2" name="Evaluate" activiti:candidateUsers="${assignee}">
      <documentation>${initiator} started a discusion about ${sSubject}.
Please give your opinion.</documentation>
      <extensionElements>
        <activiti:formProperty id="sSubject" name="Subject" type="string" variable="${sSubject}" writable="false"></activiti:formProperty>
        <activiti:formProperty id="sDescription" name="Description" type="string" variable="${sDescription}" writable="false"></activiti:formProperty>
        <activiti:formProperty id="sOpinion" name="Opinion" type="string" variable="${sOpinion}" required="true"></activiti:formProperty>
        <activiti:formProperty id="assignee" name="Assignees" type="string" variable="${assignee}"></activiti:formProperty>
      </extensionElements>
      <multiInstanceLoopCharacteristics isSequential="true">
        <loopCardinality>50</loopCardinality>
        <completionCondition>${assignee = ""}</completionCondition>
      </multiInstanceLoopCharacteristics>
    </userTask>
    <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow3" sourceRef="usertask2" targetRef="endevent1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_TechSample">
    <bpmndi:BPMNPlane bpmnElement="TechSample" id="BPMNPlane_TechSample">
      <bpmndi:BPMNShape bpmnElement="st01" id="BPMNShape_st01">
        <omgdc:Bounds height="35.0" width="35.0" x="150.0" y="120.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55.0" width="105.0" x="260.0" y="110.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
        <omgdc:Bounds height="55.0" width="105.0" x="500.0" y="110.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35.0" width="35.0" x="720.0" y="120.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="185.0" y="137.0"></omgdi:waypoint>
        <omgdi:waypoint x="260.0" y="137.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="365.0" y="137.0"></omgdi:waypoint>
        <omgdi:waypoint x="500.0" y="137.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="605.0" y="137.0"></omgdi:waypoint>
        <omgdi:waypoint x="720.0" y="137.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
<code>
5 REPLIES 5

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi José.

I created small jUnit test for your issue. Maven project can be downloaded from here.
Issues are
1. "code" tag at the end of your file - I think it was done because of copying/formatting
2. line 38 in your process definition contains only one =, there should be two ==.
<code>
                <completionCondition>${assignee == ""}</completionCondition>
</code>
Changed process definition is here

Martin

joselouro
Champ in-the-making
Champ in-the-making
Hi Martin,

Thank you very much for your help…
I'll correct it, and keep testing…

Best regards,

jbarrez
Star Contributor
Star Contributor
You should see something in your server logging that gives you an indication of the error

moakra
Champ in-the-making
Champ in-the-making
Hi,

I had the same problem today. I can not export my bpmn model to an xml file.

In my server's terminal, these are the first lines of the error message:
ERROR org.activiti.editor.ui.EditorProcessDefinitionDetailPanel - failed to export model to BPMN XML
java.lang.NullPointerException
    at org.activiti.editor.language.json.converter.BpmnJsonConverter.filterAllEdges

I attached the file localhost_access.log which is the only file showing an error (ctrl +f), all others files are empty or not showing any error.

Can you give me a clue about this problem ? Smiley Sad

Thank you

trademak
Star Contributor
Star Contributor
The exact line number of the filterAllEdges method should be included as well.
I'm expecting a sequence flow that's not correctly attached to the source or target element.

Best regards,