Skip to content

Commit af5b13e

Browse files
author
Alexandre Vazquez
committed
Initial version
Initial version
0 parents  commit af5b13e

File tree

7 files changed

+218
-0
lines changed

7 files changed

+218
-0
lines changed

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
bin
2+
obj
3+
csx
4+
.vs
5+
edge
6+
Publish
7+
8+
*.user
9+
*.suo
10+
*.cscfg
11+
*.Cache
12+
project.lock.json
13+
14+
/packages
15+
/TestResults
16+
17+
/tools/NuGet.exe
18+
/App_Data
19+
/secrets
20+
/data
21+
.secrets
22+
appsettings.json
23+
local.settings.json
24+
25+
node_modules

.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions"
4+
]
5+
}

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM mcr.microsoft.com/azure-functions/node:2.0
2+
3+
ENV AzureWebJobsScriptRoot=/home/site/wwwroot
4+
5+
COPY . /home/site/wwwroot

HelloWorld.json

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
{
2+
"imports": [
3+
"github.com/project-flogo/flow",
4+
"git.tibco.com/git/product/ipaas/wi-contrib.git/contributions/General/activity/log",
5+
"github.com/project-flogo/contrib/activity/actreturn",
6+
"git.tibco.com/git/product/ipaas/wi-contrib.git/contributions/General/trigger/rest"
7+
],
8+
"name": "HelloWorld",
9+
"description": " ",
10+
"version": "1.1.0",
11+
"type": "flogo:app",
12+
"appModel": "1.1.1",
13+
"feVersion": "2.8.0",
14+
"triggers": [
15+
{
16+
"ref": "#rest",
17+
"name": "tibco-wi-rest",
18+
"description": "Simple REST Trigger",
19+
"settings": {
20+
"port": "=$env[\"FUNCTIONS_HTTPWORKER_PORT\"]",
21+
"secureConnection": false,
22+
"serverKey": "",
23+
"caCertificate": "",
24+
"swagger": ""
25+
},
26+
"id": "ReceiveHTTPMessage",
27+
"handlers": [
28+
{
29+
"description": "",
30+
"settings": {
31+
"Method": "GET",
32+
"Path": "/hello-world",
33+
"OutputValidation": false
34+
},
35+
"action": {
36+
"ref": "github.com/project-flogo/flow",
37+
"settings": {
38+
"flowURI": "res://flow:HelloWorld"
39+
},
40+
"input": {
41+
"headers": "=$.headers"
42+
},
43+
"output": {
44+
"code": "=$.code",
45+
"message": "=$.message"
46+
}
47+
},
48+
"reply": {
49+
"code": 200,
50+
"configureResponseCodes": false,
51+
"message": {}
52+
},
53+
"schemas": {
54+
"reply": {},
55+
"output": {
56+
"headers": {
57+
"type": "json",
58+
"value": "{\"type\":\"object\",\"properties\":{\"Accept\":{\"type\":\"string\",\"visible\":false},\"Accept-Charset\":{\"type\":\"string\",\"visible\":false},\"Accept-Encoding\":{\"type\":\"string\",\"visible\":false},\"Content-Type\":{\"type\":\"string\",\"visible\":false},\"Content-Length\":{\"type\":\"string\",\"visible\":false},\"Connection\":{\"type\":\"string\",\"visible\":false},\"Cookie\":{\"type\":\"string\",\"visible\":false},\"Pragma\":{\"type\":\"string\",\"visible\":false}},\"required\":[]}",
59+
"fe_metadata": "[{\"parameterName\":\"Accept\",\"type\":\"string\",\"repeating\":\"false\",\"required\":\"false\",\"visible\":false},{\"parameterName\":\"Accept-Charset\",\"type\":\"string\",\"repeating\":\"false\",\"required\":\"false\",\"visible\":false},{\"parameterName\":\"Accept-Encoding\",\"type\":\"string\",\"repeating\":\"false\",\"required\":\"false\",\"visible\":false},{\"parameterName\":\"Content-Type\",\"type\":\"string\",\"repeating\":\"false\",\"required\":\"false\",\"visible\":false},{\"parameterName\":\"Content-Length\",\"type\":\"string\",\"repeating\":\"false\",\"required\":\"false\",\"visible\":false},{\"parameterName\":\"Connection\",\"type\":\"string\",\"repeating\":\"false\",\"required\":\"false\",\"visible\":false},{\"parameterName\":\"Cookie\",\"type\":\"string\",\"repeating\":\"false\",\"required\":\"false\",\"visible\":false},{\"parameterName\":\"Pragma\",\"type\":\"string\",\"repeating\":\"false\",\"required\":\"false\",\"visible\":false}]"
60+
}
61+
}
62+
}
63+
}
64+
]
65+
}
66+
],
67+
"resources": [
68+
{
69+
"id": "flow:HelloWorld",
70+
"data": {
71+
"name": "HelloWorld",
72+
"description": "",
73+
"links": [
74+
{
75+
"id": 1,
76+
"from": "LogMessage",
77+
"to": "Return",
78+
"type": "default"
79+
}
80+
],
81+
"tasks": [
82+
{
83+
"id": "LogMessage",
84+
"name": "LogMessage",
85+
"description": "Simple Log Message Activity",
86+
"activity": {
87+
"ref": "#log",
88+
"input": {
89+
"Log Level": "INFO",
90+
"flowInfo": false,
91+
"message": "Invoking a Flogo App inside Azure Functions"
92+
}
93+
}
94+
},
95+
{
96+
"id": "Return",
97+
"name": "Return",
98+
"description": "Simple Return Activity",
99+
"activity": {
100+
"ref": "#actreturn",
101+
"settings": {
102+
"mappings": {
103+
"code": 200,
104+
"message": "Invoking a Flogo App inside Azure Functions"
105+
}
106+
}
107+
}
108+
}
109+
],
110+
"metadata": {
111+
"input": [
112+
{
113+
"name": "headers",
114+
"type": "object",
115+
"schema": {
116+
"type": "json",
117+
"value": "{\"Accept\":{\"type\":\"string\",\"visible\":false},\"Accept-Charset\":{\"type\":\"string\",\"visible\":false},\"Accept-Encoding\":{\"type\":\"string\",\"visible\":false},\"Content-Type\":{\"type\":\"string\",\"visible\":false},\"Content-Length\":{\"type\":\"string\",\"visible\":false},\"Connection\":{\"type\":\"string\",\"visible\":false},\"Cookie\":{\"type\":\"string\",\"visible\":false},\"Pragma\":{\"type\":\"string\",\"visible\":false}}"
118+
}
119+
}
120+
],
121+
"output": [
122+
{
123+
"name": "code",
124+
"type": "integer"
125+
},
126+
{
127+
"name": "message",
128+
"type": "string"
129+
}
130+
],
131+
"fe_metadata": {
132+
"input": "{\"type\":\"object\",\"title\":\"ReceiveHTTPMessage\",\"properties\":{\"headers\":{\"type\":\"object\",\"properties\":{\"Accept\":{\"type\":\"string\",\"visible\":false},\"Accept-Charset\":{\"type\":\"string\",\"visible\":false},\"Accept-Encoding\":{\"type\":\"string\",\"visible\":false},\"Content-Type\":{\"type\":\"string\",\"visible\":false},\"Content-Length\":{\"type\":\"string\",\"visible\":false},\"Connection\":{\"type\":\"string\",\"visible\":false},\"Cookie\":{\"type\":\"string\",\"visible\":false},\"Pragma\":{\"type\":\"string\",\"visible\":false}},\"required\":[]}}}",
133+
"output": "{\"type\":\"object\",\"title\":\"Inputs\",\"properties\":{\"code\":{\"type\":\"integer\",\"required\":false},\"message\":{\"type\":\"string\",\"required\":false}},\"required\":[]}"
134+
}
135+
},
136+
"explicitReply": true
137+
}
138+
}
139+
],
140+
"properties": [
141+
{
142+
"name": "FUNCTIONS_HTTPWORKER_PORT",
143+
"type": "float64",
144+
"value": 8080
145+
}
146+
],
147+
"connections": {},
148+
"contrib": "W3sicmVmIjoiZ2l0LnRpYmNvLmNvbS9naXQvcHJvZHVjdC9pcGFhcy93aS1jb250cmliLmdpdC9jb250cmlidXRpb25zL0dlbmVyYWwiLCJzM2xvY2F0aW9uIjoiVGliY28vR2VuZXJhbCJ9XQ==",
149+
"fe_metadata": "UEsDBAoAAAAIAKl+nFCrqSRGFQAAABMAAAAIAAAAYXBwLmpzb26rViopykxPTy1yy8kvL1ayio6tBQBQSwECFAAKAAAACACpfpxQq6kkRhUAAAATAAAACAAAAAAAAAAAAAAAAAAAAAAAYXBwLmpzb25QSwUGAAAAAAEAAQA2AAAAOwAAAAAA"
150+
}

hello-world/function.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"disabled": false,
3+
"bindings": [
4+
{
5+
"authLevel": "function",
6+
"type": "httpTrigger",
7+
"direction": "in",
8+
"name": "req",
9+
"methods": [
10+
"get",
11+
"post"
12+
]
13+
},
14+
{
15+
"type": "http",
16+
"direction": "out",
17+
"name": "res"
18+
}
19+
]
20+
}

hello-world/sample.dat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"name": "Azure"
3+
}

host.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"version": "2.0",
3+
"httpWorker": {
4+
"description": {
5+
"arguments": ["-app"],
6+
"defaultExecutablePath": "engine-windows-amd64.exe",
7+
"defaultWorkerPath": "HelloWorld.json"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)