Skip to content

Commit 0ee27a9

Browse files
Merge pull request #3 from project-flogo/master
update
2 parents 667f18d + 62046b3 commit 0ee27a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1935
-1025
lines changed

activity/actreply/README.md

+8-22
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,21 @@ weight: 4601
77
This activity allows you to reply to a trigger invocation and map output values. After replying to the trigger, this activity will allow the action to continue further.
88

99
## Installation
10+
1011
### Flogo Web
1112
This activity comes out of the box with the Flogo Web UI
13+
1214
### Flogo CLI
1315
```bash
1416
flogo install github.com/project-flogo/contrib/activity/actreply
1517
```
1618

17-
## Metadata
18-
```json
19-
{
20-
"settings":[
21-
{
22-
"name": "mappings",
23-
"type": "object",
24-
"required": true,
25-
"display": {
26-
"name": "Mapper",
27-
"type": "mapper",
28-
"mapperOutputScope" : "action.output"
29-
}
30-
}
31-
]
32-
}
33-
```
34-
### Details
35-
#### Settings:
36-
| Setting | Required | Description |
37-
|:------------|:---------|:------------|
38-
| mappings | true | An set of mappings that are executed when the activity runs |
19+
## Configuration
20+
21+
### Settings:
22+
| Name | Type | Description
23+
|:--- | :--- | :---
24+
| mappings | object | Set of mappings to execute when the activity runs
3925

4026
## Example
4127
The below example allows you to configure the activity to reply and set the output values to literals "name" (a string) and 2 (an integer).

activity/actreply/activity.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func init() {
1111
}
1212

1313
type Settings struct {
14-
Mappings map[string]interface{} `md:"mappings,required"`
14+
Mappings map[string]interface{} `md:"mappings,required"` // Set of mappings to execute when the activity runs
1515
}
1616

1717
var activityMd = activity.ToMetadata(&Settings{})

activity/actreply/activity_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func newActionContext() *test.TestActivityHost {
7070

7171
ac := &test.TestActivityHost{
7272
HostId: "1",
73-
HostRef: "github.com/TIBCOSoftware/flogo-contrib/action/flow",
73+
HostRef: "github.com/project-flogo/flow",
7474
IoMetadata: &metadata.IOMetadata{Input: input, Output: output},
7575
HostData: data.NewSimpleScope(nil, nil),
7676
}

activity/actreply/descriptor.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"name": "Mapper",
1616
"type": "mapper",
1717
"mapperOutputScope" : "action.output"
18-
}
18+
},
19+
"description": "Set of mappings to execute when the activity runs"
1920
}
2021
]
2122
}

activity/actreply/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/project-flogo/contrib/activity/actreply
22

33
require (
4-
github.com/project-flogo/core v0.9.0-alpha.6
5-
github.com/stretchr/testify v1.2.2
4+
github.com/project-flogo/core v0.9.0-beta.1
5+
github.com/stretchr/testify v1.3.0
66
)

activity/actreply/go.sum

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
44
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
55
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
66
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7-
github.com/project-flogo/core v0.9.0-alpha.6 h1:ugQmmE1WQ75gzHwFpIv7Wbt1wTqNmWj94J8t6sKdKPw=
8-
github.com/project-flogo/core v0.9.0-alpha.6/go.mod h1:eB+hMcq51lOIeJ93K8Nvvm/vC3OI60ZaEgBbA4gtk8k=
9-
github.com/square-it/jsonschema v1.9.1/go.mod h1:80WJHSuy3YnokzfFopfx+MAt5lVVnVpS6w2Avv+svHk=
10-
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
11-
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
7+
github.com/project-flogo/core v0.9.0-beta.1 h1:tiRv5Lv6U1SnDJh6vB10y8AnEdF8/Zmahj8WgCDqS6I=
8+
github.com/project-flogo/core v0.9.0-beta.1/go.mod h1:dzmBbQfNNC0g0KClKYQxxGJLe53MHafg75Vhmw2TW8U=
9+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
10+
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
11+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
1212
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
1313
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
1414
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=

activity/actreturn/README.md

+8-22
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,21 @@ weight: 4602
77
This activity allows you to reply to a trigger invocation and map output values. After replying to the trigger, the flow ends (this will be the last actvity in your flow).
88

99
## Installation
10+
1011
### Flogo Web
1112
This activity comes out of the box with the Flogo Web UI
13+
1214
### Flogo CLI
1315
```bash
1416
flogo install github.com/project-flogo/contrib/activity/actreturn
1517
```
1618

17-
## Metadata
18-
```json
19-
{
20-
"settings":[
21-
{
22-
"name": "mappings",
23-
"type": "object",
24-
"required": true,
25-
"display": {
26-
"name": "Mapper",
27-
"type": "mapper",
28-
"mapperOutputScope" : "action.output"
29-
}
30-
}
31-
]
32-
}
33-
```
34-
### Details
35-
#### Settings:
36-
| Setting | Required | Description |
37-
|:------------|:---------|:------------|
38-
| mappings | true | An set of mappings that are executed when the activity runs |
19+
## Configuration
20+
21+
### Settings:
22+
| Name | Type | Description
23+
|:--- | :--- | :---
24+
| mappings | object | Set of mappings to execute when the activity runs
3925

4026

4127
## Example

activity/actreturn/activity.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ func init() {
1111
}
1212

1313
type Settings struct {
14-
Mappings map[string]interface{} `md:"mappings"`
14+
Mappings map[string]interface{} `md:"mappings"` // Set of mappings to execute when the activity runs
1515
}
1616

1717
var activityMd = activity.ToMetadata(&Settings{})

activity/actreturn/activity_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func newActionContext() *test.TestActivityHost {
7070

7171
ac := &test.TestActivityHost{
7272
HostId: "1",
73-
HostRef: "github.com/TIBCOSoftware/flogo-contrib/action/flow",
73+
HostRef: "github.com/project-flogo/flow",
7474
IoMetadata: &metadata.IOMetadata{Input: input, Output: output},
7575
HostData: data.NewSimpleScope(nil, nil),
7676
}

activity/actreturn/descriptor.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"name": "Mapper",
1616
"type": "mapper",
1717
"mapperOutputScope" : "action.output"
18-
}
18+
},
19+
"description": "Set of mappings to execute when the activity runs"
1920
}
2021
]
2122
}

activity/actreturn/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/project-flogo/contrib/activity/actreturn
22

33
require (
4-
github.com/project-flogo/core v0.9.0-alpha.6
5-
github.com/stretchr/testify v1.2.2
4+
github.com/project-flogo/core v0.9.0-beta.1
5+
github.com/stretchr/testify v1.3.0
66
)

activity/actreturn/go.sum

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
44
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
55
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
66
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7-
github.com/project-flogo/core v0.9.0-alpha.6 h1:ugQmmE1WQ75gzHwFpIv7Wbt1wTqNmWj94J8t6sKdKPw=
8-
github.com/project-flogo/core v0.9.0-alpha.6/go.mod h1:eB+hMcq51lOIeJ93K8Nvvm/vC3OI60ZaEgBbA4gtk8k=
9-
github.com/square-it/jsonschema v1.9.1/go.mod h1:80WJHSuy3YnokzfFopfx+MAt5lVVnVpS6w2Avv+svHk=
10-
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
11-
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
7+
github.com/project-flogo/core v0.9.0-beta.1 h1:tiRv5Lv6U1SnDJh6vB10y8AnEdF8/Zmahj8WgCDqS6I=
8+
github.com/project-flogo/core v0.9.0-beta.1/go.mod h1:dzmBbQfNNC0g0KClKYQxxGJLe53MHafg75Vhmw2TW8U=
9+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
10+
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
11+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
1212
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
1313
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
1414
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=

activity/channel/README.md

+10-24
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,22 @@ weight: 4603
44
-->
55

66
# Channel
7-
This activity allows you to put a data on a named channel in the flogo engine.
7+
This activity allows you to put a data on a named channel in the flogo engine. Channels are
8+
essentially an internal communication channel in the engine.
89

910

1011
## Installation
12+
1113
### Flogo CLI
1214
```bash
1315
flogo install github.com/project-flogo/contrib/activity/channel
1416
```
1517

16-
## Metadata
17-
```json
18-
{
19-
"input":[
20-
{
21-
"name": "channel",
22-
"type": "string",
23-
"required": true
24-
},
25-
{
26-
"name": "data",
27-
"type": "interface{}",
28-
"required": true
29-
}
30-
]
31-
}
32-
```
33-
### Details
34-
#### Input:
35-
| Name | Required | Description |
36-
|:------------|:---------|:------------|
37-
| channel | true | The channel to put the value on |
38-
| data | true | The data to put on the channel |
18+
## Configuration
19+
20+
### Input:
21+
| Name | Type | Description
22+
|:--- | :--- | :---
23+
| channel | string | The name of channel to use - **REQUIRED**
24+
| value | any | The data to put on the channel
3925

activity/channel/descriptor.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
{
1010
"name": "channel",
1111
"type": "string",
12-
"required": true
12+
"required": true,
13+
"description": "The name of channel to use"
1314
},
1415
{
1516
"name": "value",
16-
"type": "any"
17+
"type": "any",
18+
"description": "The data to put on the channel"
1719
}
1820
]
1921
}

activity/channel/go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/project-flogo/contrib/activity/channel
22

33
require (
4-
github.com/project-flogo/core v0.9.0-alpha.6
5-
github.com/stretchr/testify v1.2.2
4+
github.com/project-flogo/core v0.9.0-beta.1
5+
github.com/stretchr/testify v1.3.0
66
)

activity/channel/go.sum

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
44
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
55
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
66
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7-
github.com/project-flogo/core v0.9.0-alpha.6 h1:ugQmmE1WQ75gzHwFpIv7Wbt1wTqNmWj94J8t6sKdKPw=
8-
github.com/project-flogo/core v0.9.0-alpha.6/go.mod h1:eB+hMcq51lOIeJ93K8Nvvm/vC3OI60ZaEgBbA4gtk8k=
9-
github.com/square-it/jsonschema v1.9.1/go.mod h1:80WJHSuy3YnokzfFopfx+MAt5lVVnVpS6w2Avv+svHk=
10-
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
11-
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
7+
github.com/project-flogo/core v0.9.0-beta.1 h1:tiRv5Lv6U1SnDJh6vB10y8AnEdF8/Zmahj8WgCDqS6I=
8+
github.com/project-flogo/core v0.9.0-beta.1/go.mod h1:dzmBbQfNNC0g0KClKYQxxGJLe53MHafg75Vhmw2TW8U=
9+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
10+
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
11+
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
1212
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
1313
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
1414
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=

activity/channel/metadata.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ import (
44
"github.com/project-flogo/core/data/coerce"
55
)
66

7-
type Settings struct {
8-
Channel string `md:"channel,required"`
9-
}
10-
117
type Input struct {
12-
Channel string `md:"channel,required"`
13-
Data interface{} `md:"data"`
8+
Channel string `md:"channel,required"` //The name of channel to use
9+
Data interface{} `md:"data"` //The data to put on the channel
1410
}
1511

1612
func (i *Input) ToMap() map[string]interface{} {

activity/counter/README.md

+14-33
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,30 @@ weight: 4609
77
This activity allows you to use a global counter.
88

99
## Installation
10+
1011
### Flogo Web
1112
This activity comes out of the box with the Flogo Web UI
13+
1214
### Flogo CLI
1315
```bash
1416
flogo install github.com/project-flogo/contrib/activity/counter
1517
```
1618

17-
## Metadata
18-
```json
19-
{
20-
"settings":[
21-
{
22-
"name": "counterName",
23-
"type": "string",
24-
"required": true
25-
},
26-
{
27-
"name": "op",
28-
"type": "string",
29-
"allowed" : ["get", "increment", "reset"]
30-
}
31-
],
32-
"output": [
33-
{
34-
"name": "value",
35-
"type": "integer"
36-
}
37-
]
38-
}
39-
```
40-
### Details
41-
#### Settings:
42-
| Setting | Required | Description |
43-
|:------------|:---------|:------------|
44-
| counterName | true | The name of the counter |
45-
| op | false | Counter operation, 'get' is the default operation|
19+
## Configuration
4620

47-
#### Output:
48-
|Name | Description |
49-
|:--------|:------------|
50-
| value | the result of the counter operation
21+
### Settings:
22+
| Name | Type | Description
23+
|:--- | :--- | :---
24+
| counterName | string | The name of the counter - **REQUIRED**
25+
| op | string | The counter operation, 'get' is the default operation
26+
27+
### Output:
28+
| Name | Type | Description
29+
|:--- | :--- | :---
30+
| value | int | The result of the counter operation
5131

5232
## Examples
33+
5334
### Increment
5435
The below example increments a 'messages' counter:
5536

0 commit comments

Comments
 (0)