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

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

XMLWordPrintable

    • 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
    • ---
    • ---

      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

              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

                Created:
                Updated:
                Resolved: