Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-7567

[SWF Editor] is duplicating actions in worklow after getContent()

    XMLWordPrintable

Details

    • False
    • None
    • False
    • Hide

      1. Open attached before-getContent.sw.json in sw editor
      2. Download it - call getContent()
      3. Compare the downloaded file with before-getContent.sw.json

      Show
      1. Open attached before-getContent.sw.json in sw editor 2. Download it - call getContent() 3. Compare the downloaded file with before-getContent.sw.json
    • ---
    • ---

    Description

      Summary
      When you open examples with following definition:

      "onEvents": [
              {
                "eventRefs": ["GreetingEvent"],
                "eventDataFilter": {
                  "data": "${ .greet }",
                  "toStateData": "${ .greet }"
                },
                "actions": [
                  {
                    "functionRef": {
                      "refName": "greetingFunction",
                      "arguments": {
                        "name": "${ .greet.name }"
                      }
                    }
                  }
                ]
              }
            ]
      

      Editor will duplicate some lines, adds some new lines after unmarshalling procedure (getContetn() is called)
      Once unmarshalled the actions array will look like this:

      "actions": [
                  {
                    "functionRef": {
                      "refName": "greetingFunction",
                      "arguments": {
                        "name": "${ .greet.name }"
                      }
                    },
                    "name": {
                      "refName": "greetingFunction",
                      "arguments": {
                        "name": "${ .greet.name }"
                      }
                    }
                  }
                ]
      

      You can also examine the issue in the attachments.

      Expected results:
      The actions array is not changed and the file is identical after marshalling/unmarshalling

      Attachments

        Issue Links

          Activity

            People

              josephblt Wagner Lemos (Inactive)
              dhanak@redhat.com Dominik Hanak
              Dominik Hanak Dominik Hanak
              Dominik Hanak Dominik Hanak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: