The flogo.json file is the metadata describing an application. The application dictates the dependencies to be used during compile time and can also be embeded into the compiled binary.
{
"name": "SampleApp",
"type": "flogo:app",
"version": "0.0.1",
"appModel": "1.1.0",
"description": "",
"imports": [
"github.com/project-flogo/contrib/activity/log",
"github.com/project-flogo/contrib/trigger/rest",
"github.com/project-flogo/flow"
],
"triggers": [
{
"id": "receive_http_message",
"ref": "#rest",
"name": "Receive HTTP Message",
"description": "Simple REST Trigger",
"settings": {
"port": 8080
},
"handlers": [
{
"settings": {
"method": "GET",
"path": "/test"
},
"action": {
"ref": "#flow",
"settings": {
"flowURI": "res://flow:get_name"
},
"input": {
"name": "=$.content.name"
},
"output": {
"code": 200,
"data": "=$.greeting"
}
}
}
]
}
],
"resources": [
{
"id": "flow:get_name",
"data": {
"name": "GetName",
"metadata": {
"input": [
{
"name": "name",
"type": "string"
}
],
"output": [
{
"name": "greeting",
"type": "string"
}
]
},
"tasks": [
{
"id": "log_2",
"name": "Log",
"description": "Logs a message",
"activity": {
"ref": "#log",
"input": {
"message": "",
"addDetails": false
}
}
}
]
}
}
]
}
flogo:app
imports
array is used by the CLI include specific imports and versions in your application at build time. Use this to specify any additional contributions, such as, functions, that you’d like to leverage. The CLI will automatically pull any mentioned contribs at app create or during flogo imports sync
command.