cancel
Showing results for 
Search instead for 
Did you mean: 

Diferent BPMN20.xml when Importing in eclipse

warden
Champ in-the-making
Champ in-the-making
Hi everybody,

I'm new with activiti. I testing activiti modeler with Eclipse using the simple example adhoc in activiti-engine-examples.

Why when I import Expense_process.bpmn20.xml in eclipse it generates a .activiti file, and when you save it generates the file the a Expense_process.bpmn20.xml and both are different?
Eg: it doesn't have formProperty…

Here I write the bpmn20.xml original

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <definitions targetNamespace="adhoc" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:ns3="http://activiti.org/bpmn" xmlns:ns5="http://www.omg.org/spec/DD/20100524/DC" xmlns:ns4="http://www.omg.org/spec/DD/20100524/DI" xmlns:ns6="http://www.omg.org/spec/BPMN/20100524/DI">
- <process isExecutable="false" name="Expense process" id="adhoc_Expense_process">
  <documentation id="adhoc_Expense_process_documentation">Example process created using Activiti KickStart</documentation>
  <startEvent ns3:initiator="initiator" id="theStart" />
  <sequenceFlow targetRef="task_1" sourceRef="theStart" id="flow_1" />
- <userTask name="Request expense refund" id="task_1">
  <documentation id="task_1_documentation">Request the refund of an expense related to company business.</documentation>
- <extensionElements>
  <ns3:formProperty required="true" type="long" name="Amount" id="Amount" />
  <ns3:formProperty required="false" type="string" name="Motivation" id="Motivation" />
  </extensionElements>
- <humanPerformer id="sid-657391c0-67aa-48d9-a265-5f8647991926_humanPerformer">
- <resourceAssignmentExpression id="sid-657391c0-67aa-48d9-a265-5f8647991926_humanPerformer_assignmentExpression">
  <formalExpression id="sid-657391c0-67aa-48d9-a265-5f8647991926_humanPerformer_formalExpressions">${initiator}</formalExpression>
  </resourceAssignmentExpression>
  </humanPerformer>
  </userTask>
  <sequenceFlow targetRef="task_2" sourceRef="task_1" id="flow_2" />
- <userTask name="Handle expense request" id="task_2">
  <documentation id="task_2_documentation">${initiator} has filed an expense refund request.</documentation>
- <extensionElements>
  <ns3:formProperty required="true" type="string" name="Do you agree?" id="Do you agree?" />
  </extensionElements>
- <potentialOwner id="sid-b75f0c60-fed7-4f09-9334-b2615bed6c71_potentialOwner">
- <resourceAssignmentExpression id="sid-b75f0c60-fed7-4f09-9334-b2615bed6c71_potentialOwner_assignmentExpression">
  <formalExpression id="sid-b75f0c60-fed7-4f09-9334-b2615bed6c71_potentialOwner_formalExpressions">management</formalExpression>
  </resourceAssignmentExpression>
  </potentialOwner>
  </userTask>
  <endEvent id="theEnd" />
  <sequenceFlow targetRef="theEnd" sourceRef="task_2" id="flow_3" />
  </process>
- <ns6:BPMNDiagram id="Expense_process_diagram">
- <ns6:BPMNPlane bpmnElement="adhoc_Expense_process" id="Expense_process_plane">
- <ns6:BPMNShape bpmnElement="theStart" id="theStart_shape">
  <ns5:Bounds height="20.0" width="20.0" y="45.0" x="0.0" />
  </ns6:BPMNShape>
- <ns6:BPMNEdge bpmnElement="flow_1" id="flow_1_edge">
  <ns4:waypoint y="55.0" x="20.0" />
  <ns4:waypoint y="55.0" x="70.0" />
  </ns6:BPMNEdge>
- <ns6:BPMNShape bpmnElement="task_1" id="task_1_shape">
  <ns5:Bounds height="60.0" width="130.0" y="25.0" x="70.0" />
  </ns6:BPMNShape>
- <ns6:BPMNEdge bpmnElement="flow_2" id="flow_2_edge">
  <ns4:waypoint y="55.0" x="200.0" />
  <ns4:waypoint y="55.0" x="250.0" />
  </ns6:BPMNEdge>
- <ns6:BPMNShape bpmnElement="task_2" id="task_2_shape">
  <ns5:Bounds height="60.0" width="130.0" y="25.0" x="250.0" />
  </ns6:BPMNShape>
- <ns6:BPMNEdge bpmnElement="flow_3" id="flow_3_edge">
  <ns4:waypoint y="55.0" x="380.0" />
  <ns4:waypoint y="55.0" x="430.0" />
  </ns6:BPMNEdge>
- <ns6:BPMNShape bpmnElement="theEnd" id="theEnd_shape">
  <ns5:Bounds height="20.0" width="20.0" y="45.0" x="430.0" />
  </ns6:BPMNShape>
  </ns6:BPMNPlane>
  </ns6:BPMNDiagram>
  </definitions>



and here the same file when it 's imported to eclipse.

<?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="adhoc">
  <process id="Expense_process" name="Expense process">
    <documentation>Prueba</documentation>
    <startEvent id="startevent1" name="Start" activiti:initiator="initiator"></startEvent>
    <userTask id="usertask1" name="Request expense refund" activiti:assignee="${initiator}" activiti:formKey="pruebast.form"></userTask>
    <userTask id="usertask2" name="Handle expense request" activiti:candidateGroups="management"></userTask>
    <endEvent id="endevent1" name="End"></endEvent>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <sequenceFlow id="flow2" name="" sourceRef="usertask1" targetRef="usertask2"></sequenceFlow>
    <sequenceFlow id="flow3" name="" sourceRef="usertask2" targetRef="endevent1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_Expense_process">
    <bpmndi:BPMNPlane bpmnElement="Expense_process" id="BPMNPlane_Expense_process">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35" width="35" x="30" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55" width="105" x="125" y="190"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
        <omgdc:Bounds height="55" width="105" x="290" y="190"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35" width="35" x="455" y="200"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="65" y="217"></omgdi:waypoint>
        <omgdi:waypoint x="125" y="217"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="230" y="217"></omgdi:waypoint>
        <omgdi:waypoint x="290" y="217"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="395" y="217"></omgdi:waypoint>
        <omgdi:waypoint x="455" y="217"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>


Thank you!
8 REPLIES 8

trademak
Star Contributor
Star Contributor
Hi,

You're right. The Activiti Designer parse the imported BPMN document and generates its own BPMN 2.0 XML document.
But semantically the documents are equal. For example we get rid of the default generated ids.

Best regards,

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
but the formPoperty elements should not get lost should they?

trademak
Star Contributor
Star Contributor
Hi,

I think I missed that in the post, sorry.
Fix is committed to the trunk.

Best regards,

warden
Champ in-the-making
Champ in-the-making
Thank you

As you say it generates its own bpmn20.xml that is semantically equal to the original.
The really issue for me is the formProperties. I try to use them embedded as Kickstart makes, but eclipse doesn't support it or I don't know how to do it.

And really when I try with external form (request.form , approval.from …) and I export the bat to Activiti Explorer I have some issues as:
- Activiti doesn't find or show the forms.
- Description doesn't appears in the process documentation in Activiti explorer.
- No variables appears.

I'm sure this is because I doing something wrong but I don't know what.

Thank you again.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Already fixed in trunk as can be read in the other posts.

(Hint: I you use open source software, read more than only your own posts! You'll learn a LOT from that)

anuppc72
Champ in-the-making
Champ in-the-making
I agree with Warden, the formproperty was not fully supported in earlier version and is still bit pokey.  I had modified the .bpmn20.xml by hand as this is according to the BPMN syntax. However the master file seems to be the .activiti file that generates this bpmn20.xml file. ugghh the issue is everytime i change a few things then my manual additions in the bpmn20.xml get over wriitten…

trademak
Star Contributor
Star Contributor
Hi,

Can you give a specific pointer what you changed in the BPMN 2.0 XML?
Because these changes should be updated in the .activiti file as well.

Best regards,

anuppc72
Champ in-the-making
Champ in-the-making
    <startEvent id="startevent1" name="Start">
      <extensionElements>
        <activiti:formProperty id="CRNumber" name="CR Number" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
        <activiti:formProperty id="typeCR" name="CR Type" type="enum" required="true" readable="true" writable="true">
          <activiti:value id="Cost Reduction" name="Cost Reduction"></activiti:value>
          <activiti:value id="Vendor Requirement" name="Vendor Requirement"></activiti:value>
          <activiti:value id="Unassigned" name="Unassigned"></activiti:value>
          <activiti:value id="Product Improvement" name="Product Improvement"></activiti:value>
          <activiti:value id="New Production Introduction" name="New Production Introduction"></activiti:value>
          <activiti:value id="Marketing Requirement" name="Marketing Requirement"></activiti:value>
          <activiti:value id="Facilitate Manufacturing" name="Facilitate Manufacturing"></activiti:value>
          <activiti:value id="Cost Reduction" name="Cost Reduction"></activiti:value>
        </activiti:formProperty>
        <activiti:formProperty id="priority" name="Priority" type="enum" required="true" readable="true" writable="true">
          <activiti:value id="Low" name="Low"></activiti:value>
          <activiti:value id="Medium" name="Medium"></activiti:value>
          <activiti:value id="High" name="High"></activiti:value>
        </activiti:formProperty>
        <activiti:formProperty id="description" name="Description" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
        <activiti:formProperty id="changeReason" name="Reason For Change" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
        <activiti:formProperty id="affectedArtifact" name="Affected Artifact" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
        <activiti:formProperty id="comments" name="Comments" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
      </extensionElements>
    </startEvent>
If i add the <extensionElements> as above in the bpmn20.xml file then the .activiti file does not reflect the changes. However if you update the .activiti file with

  <bpmn2Smiley FrustratedtartEvent id="startevent1" name="Start" outgoing="flow1" formKey="" initiator="">
    <formProperties id="CRNumber" name="CR Number" type="string" value="" readable="true" writeable="true" required="true"/>
    <formProperties id="typeCR" name="CR Type" type="enum" value="" readable="true" writeable="true" required="true">
      <formValues valueId="Cost Reduction" valueName="Cost Reduction"/>
      <formValues valueId="Vendor Requirement" valueName="Vendor Requirement"/>
      <formValues valueId="Unassigned" valueName="Unassigned"/>
      <formValues valueId="Product Improvement" valueName="Product Improvement"/>
      <formValues valueId="New Production Introduction" valueName="New Production Introduction"/>
      <formValues valueId="Marketing Requirement" valueName="Marketing Requirement"/>
      <formValues valueId="Facilitate Manufacturing" valueName="Facilitate Manufacturing"/>
      <formValues valueId="Cost Reduction" valueName="Cost Reduction"/>
    </formProperties>
    <formProperties id="priority" name="Priority" type="enum" value="" readable="true" writeable="true" required="true">
      <formValues valueId="Low" valueName="Low"/>
      <formValues valueId="Medium" valueName="Medium"/>
      <formValues valueId="High" valueName="High"/>
    </formProperties>
    <formProperties id="description" name="Description" type="string" value="" readable="true" writeable="true" required="true"/>
    <formProperties id="changeReason" name="Reason For Change" type="string" value="" readable="true" writeable="true" required="true"/>
    <formProperties id="affectedArtifact" name="Affected Artifact" type="string" value="" readable="true" writeable="true" required="true"/>
    <formProperties id="comments" name="Comments" type="string" value="" readable="true" writeable="true" required="true"/>
  </bpmn2Smiley FrustratedtartEvent>

Then the .bpmn20.xml is updated.

Hope that helps. Anyway not an issue but inconvenience nevertheless.