Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-74524

Kaleo Designer adds spurious configurations to XML document when changing to "View" mode

    Details

    • Fix Priority:
      4

      Description

      When we add an XML document to the "Source" from Kaleo Designer and then go to the "View" mode, some content can be added to specific nodes, resulting in a different workflow definition than the one first given.

      Steps to reproduce

      1. Go to Kaleo Designer.
      2. Go to the "Source (Kaleo XML)" mode.
      3. Replace the content of the editor with the content from single-approver-3.xml.
      4. Go back to the "View" mode.
      5. Go back to the "Source (Kaleo XML)" mode.
      6. Compare the resulting XML document to the original one we got from single-approver-3.xml .

      Expected results

      • The content we got from the editor would be identical to the one from single-approver-3.xml. At most, some formatting changes would be applied.

      Actual results

      • Where we had
        <transition>
            <name>review</name>
            <target>review</target>
        </transition>
        

        now we have an extra <default>true</default> added at line 18.

        <transition>
            <name>review</name>
            <target>review</target>
            <default>true</default>
        </transition>
        
      • Where we had
        <notification>
            <name>Creator Modification Notification</name>
            <template>
                <![CDATA[]]>
            </template>
            <template-language>freemarker</template-language>
            <notification-type>email</notification-type>
            <notification-type>user-notification</notification-type>
            <execution-type>onAssignment</execution-type>
        </notification>
        
        

        now we have this:

            <name>Creator Modification Notification</name>
            <template>
                <![CDATA[]]>
            </template>
            <template-language>freemarker</template-language>
            <notification-type>user-notification</notification-type>
            <recipients>
                <user/>
            </recipients>
            <execution-type>onAssignment</execution-type>
        </notification>
        

        In this new result:

        • <notification-type>email</notification-type> line was deleted;
        • The lines below were added:
          <recipients>
              <user/>
          </recipients>
          
        • The same happened to the node at line 85.
      • Where we used to have
        <notification>
            <name>Review Completion Notification</name>
            <template>
                <![CDATA[]]>
            </template>
            <template-language>freemarker</template-language>
            <notification-type>email</notification-type>
            <recipients receptionType="to">
                <user/>
            </recipients>
            <execution-type>onExit</execution-type>
        </notification>
        

        now we have

        <notification>
            <name>Review Completion Notification</name>
            <template>
                <![CDATA[]]>
            </template>
            <template-language>freemarker</template-language>
            <notification-type>email</notification-type>
            <recipients>
                <user/>
            </recipients>
            <execution-type>onExit</execution-type>
        </notification>
        

        i.e the receptionType="to" attribute from recipients was dropped.

      • Where we used to have
        <role>
            <role-type>organization</role-type>
            <name>Organization Administrator</name>
        </role>
        

        now we have an extra <auto-create>false</auto-create> line:

         <role>
            <role-type>organization</role-type>
            <name>Organization Administrator</name>
            <auto-create>false</auto-create>
        </role>
      • Where we used to have
        <transition>
            <name>approve</name>
            <target>approved</target>
        </transition>
        

        now we have an extra <default>true</default> line:

        <transition>
            <name>approve</name>
            <target>approved</target>
            <default>true</default>
        </transition>
        

      Visual example

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex.pessoa Alex Pessoa (Inactive)
                Reporter:
                adam.brandizzi Adam Brandizzi
                Participants of an Issue:
                Recent user:
                Adam Brandizzi
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 11 weeks, 2 days ago

                  Packages

                  Version Package
                  Master