cancel
Showing results for 
Search instead for 
Did you mean: 

[Eclipse] Diagram modifications removes data in XML file

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

I'am using Eclipse to create my Workflow. If I change something in the diagram (ie : just move the endEvent) and save. All code inside <activiti:string> is deleted.

Please look at the "<activiti:string>execution.setVariable('sgfwf_approveRejectOutcome',task.getVariable('sgfwf_approveRejectOutcome'));</activiti:string>"

xml file before a change in diagram

<?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" 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://activiti.org/bpmn20">
  <process id="Simple" name="Adhoc Activiti Process 08:33">
    <startEvent id="start" name="Start" activiti:formKey="sgfwf:submitStart"></startEvent>
    <userTask id="modifyReview" name="Add/Modify Data, Accept or Reject" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="sgfwf:modifyReviewTask">
      <extensionElements>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('sgfwf_approveRejectOutcome',task.getVariable('sgfwf_approveRejectOutcome'));</activiti:string>
          </activiti:field>

xml file after a change in diagram
<?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" 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://activiti.org/bpmn20">
  <process id="MyProcess" name="Adhoc Activiti Process 08:33">
    <startEvent id="start" name="Start" activiti:formKey="sgfwf:submitStart"></startEvent>
    <userTask id="modifyReview" name="Add/Modify Data, Accept or Reject" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="sgfwf:modifyReviewTask">
      <extensionElements>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string></activiti:string>
          </activiti:field>

I am using Eclipse Indigo Service Release 1, Build id: 20110916-0149, WinXP SP3,   Activiti Eclipse BPMN 2.0 Designer   5.8.0.

Thank you
14 REPLIES 14

trademak
Star Contributor
Star Contributor
Oke, thanks for reporting it. Can you create a JIRA issue?
I'll make sure this is fixed.

Best regards,

dranakan
Champ on-the-rise
Champ on-the-rise

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

Another sample :

A workflow is done in Eclipse.
I add a new AlfrescoScriptTask in the wf.activiti (graphic mode)
I save
I open the wf.bpmn20.xml : Then the activiti:formKey= from the startEvent has changed.

joleroy
Champ in-the-making
Champ in-the-making
Hi,

I've got the same issue. I point out that only one line is deleted.

Before .activiti -> bpmn20.xml, I've got :

        <activiti:field name="script">
                <activiti:string>
                        execution.setVariable('wf_managementGroup', groups.getGroup('Management').getFullName());

                </activiti:string>
        </activiti:field>

After export :

        <activiti:field name="script">
                <activiti:string>
                        execution.setVariable('wf_managementGroup', groups.getGroup('Management').getFullName());
                </activiti:string>
        </activiti:field>

My workaround is to add one line before "</activiti:string>", but I've got to do it each time I export to bpm20.xml. I am waiting for this development.

Best Regards,

Jonathan Le Roy

joleroy
Champ in-the-making
Champ in-the-making
Hi,

I've just tested Activiti 5.9, it works for me. My development persists in the single file *.bpmn, I can modify it by a text editor, or the plugin.

Thank you.

ronk
Champ in-the-making
Champ in-the-making
Hi,

This problem is quite severe, as the designer is modifying the XML file causing loss of information.

In our case, the "name" attributes of every sequenceFlow is being erased from the file.    Note this happens
when the (.BPMN) file is opened in the designer in Eclipse.    When saving the file, the attributes stay intact.

So to see this issue, create a new flow in the designer, give a name to some sequenceFlow, save the file
and close the Editor.   Now re-open the file and inspect (both the diagram and the XML text) - the names are gone.

It may be that other elements are being erased as well - we only checked this particular one.

(EDIT - as far as I can tell, this only started happening with the latest update of the designer)

hawkan
Champ in-the-making
Champ in-the-making
We're experiencing something similar with the latest version. Whenever we update an existing definition, e.g creating a new subprocess, arbitrary sequence-flow nodes are removed from the definition when saving/reopening.

Since the XML is corrupted we're, for all practical reasons, stalled in our process development for now 😞

Thankful for any progress or help on this matter,

Regards
Håkan

alexander1
Champ in-the-making
Champ in-the-making
Hello,

Default flow of Exclusive Gateway is erased as well.

Regards,
Alexander

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Please everyone, state your versions if you report something…