Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow app properties in the imported/exported apps #779

Closed
fcastill opened this issue May 21, 2018 · 0 comments · Fixed by #791
Closed

Allow app properties in the imported/exported apps #779

fcastill opened this issue May 21, 2018 · 0 comments · Fixed by #791

Comments

@fcastill
Copy link
Collaborator

fcastill commented May 21, 2018

Initial support for app settings.

Will fix TIBCOSoftware/flogo#205

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request

Current behavior
App settings/properties are not supported in the UI but they are supported by the engine. Importing an app with settings will remove them during import.

Expected behavior
Importing an app with settings should be allowed, exporting the same app should keep the app settings.

Minimal reproduction of the problem with instructions

  1. Import an app with settings
  2. Export the app
  3. Open the exported json, the settings are gone
  • Flogo version: 0.5.4

Example app json:

{
  "name": "Properties",
  "type": "flogo:app",
  "version": "0.0.1",
  "appModel": "1.0.0",
  "properties": [
    {
      "name": "PROP_BOOL",
      "type": "boolean",
      "value": true
    },
    {
      "name": "PROP_DOUBLE",
      "type": "double",
      "value": 2.0
    },
    {
      "name": "PROP_INT",
      "type": "integer",
      "value": 2
    },
    {
      "name": "PROP_LONG",
      "type": "long",
      "value": 2
    },
    {
      "name": "PROP_STRING",
      "type": "string",
      "value": "This is string"
    }
  ],
  "triggers": [
    {
      "id": "receive_http_message",
      "ref": "github.com/TIBCOSoftware/flogo-contrib/trigger/rest",
      "name": "Receive HTTP Message",
      "description": "Simple REST Trigger",
      "settings": {
        "port": "9797"
      },
      "handlers": [
        {
          "action": {
            "ref": "github.com/TIBCOSoftware/flogo-contrib/action/flow",
            "data": {
              "flowURI": "res://flow:types"
            },
            "mappings": {
              "output": [
                {
                  "mapTo": "data",
                  "type": "object",
                  "value": {
                    "p1": "{{$.boolean}}",
                    "p2": "{{$.double}}",
                    "p3": "{{$.integer}}",
                    "p4": "{{$.string}}"
                  }
                },
                {
                  "mapTo": "code",
                  "type": "literal",
                  "value": 200
                }
              ]
            }
          },
          "settings": {
            "method": "GET",
            "path": "/get"
          }
        }
      ]
    }
  ],
  "resources": [
    {
      "id": "flow:types",
      "data": {
        "name": "Types",
        "metadata": {
          "output": [
            {
              "name": "string",
              "type": "string"
            },
            {
              "name": "integer",
              "type": "integer"
            },
            {
              "name": "double",
              "type": "double"
            },
            {
              "name": "long",
              "type": "long"
            },
            {
              "name": "boolean",
              "type": "boolean"
            }
          ]
        },
        "tasks": [
          {
            "id": "actreturn_2",
            "name": "Return",
            "description": "Simple Return Activity",
            "activity": {
              "ref": "github.com/TIBCOSoftware/flogo-contrib/activity/actreturn",
              "input": {
                "mappings": [
                  {
                    "mapTo": "boolean",
                    "type": "assign",
                    "value": "$property[PROP_BOOL]"
                  },
                  {
                    "mapTo": "double",
                    "type": "assign",
                    "value": "$property[PROP_DOUBLE]"
                  },
                  {
                    "mapTo": "integer",
                    "type": "assign",
                    "value": "$property[PROP_INT]"
                  },
                  {
                    "mapTo": "long",
                    "type": "assign",
                    "value": "$property[PROP_LONG]"
                  },
                  {
                    "mapTo": "string",
                    "type": "assign",
                    "value": "$property[PROP_STRING]"
                  }
                ]
              }
            }
          }
        ]
      }
    }
  ]
}
@fcastill fcastill added this to the v0.5.5 milestone May 21, 2018
@fcastill fcastill changed the title Allow app properties into the imported/exported apps Allow app properties in the imported/exported apps May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants