Skip to content

Commit

Permalink
Merge pull request #3 from project-flogo/master
Browse files Browse the repository at this point in the history
update
  • Loading branch information
skothari-tibco authored Mar 28, 2019
2 parents 667f18d + 62046b3 commit 0ee27a9
Show file tree
Hide file tree
Showing 123 changed files with 1,935 additions and 1,025 deletions.
30 changes: 8 additions & 22 deletions activity/actreply/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,21 @@ weight: 4601
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.

## Installation

### Flogo Web
This activity comes out of the box with the Flogo Web UI

### Flogo CLI
```bash
flogo install github.com/project-flogo/contrib/activity/actreply
```

## Metadata
```json
{
"settings":[
{
"name": "mappings",
"type": "object",
"required": true,
"display": {
"name": "Mapper",
"type": "mapper",
"mapperOutputScope" : "action.output"
}
}
]
}
```
### Details
#### Settings:
| Setting | Required | Description |
|:------------|:---------|:------------|
| mappings | true | An set of mappings that are executed when the activity runs |
## Configuration

### Settings:
| Name | Type | Description
|:--- | :--- | :---
| mappings | object | Set of mappings to execute when the activity runs

## Example
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).
Expand Down
2 changes: 1 addition & 1 deletion activity/actreply/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func init() {
}

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

var activityMd = activity.ToMetadata(&Settings{})
Expand Down
2 changes: 1 addition & 1 deletion activity/actreply/activity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func newActionContext() *test.TestActivityHost {

ac := &test.TestActivityHost{
HostId: "1",
HostRef: "github.com/TIBCOSoftware/flogo-contrib/action/flow",
HostRef: "github.com/project-flogo/flow",
IoMetadata: &metadata.IOMetadata{Input: input, Output: output},
HostData: data.NewSimpleScope(nil, nil),
}
Expand Down
3 changes: 2 additions & 1 deletion activity/actreply/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"name": "Mapper",
"type": "mapper",
"mapperOutputScope" : "action.output"
}
},
"description": "Set of mappings to execute when the activity runs"
}
]
}
4 changes: 2 additions & 2 deletions activity/actreply/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/project-flogo/contrib/activity/actreply

require (
github.com/project-flogo/core v0.9.0-alpha.6
github.com/stretchr/testify v1.2.2
github.com/project-flogo/core v0.9.0-beta.1
github.com/stretchr/testify v1.3.0
)
14 changes: 7 additions & 7 deletions activity/actreply/go.sum
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/project-flogo/core v0.9.0-alpha.6 h1:ugQmmE1WQ75gzHwFpIv7Wbt1wTqNmWj94J8t6sKdKPw=
github.com/project-flogo/core v0.9.0-alpha.6/go.mod h1:eB+hMcq51lOIeJ93K8Nvvm/vC3OI60ZaEgBbA4gtk8k=
github.com/square-it/jsonschema v1.9.1/go.mod h1:80WJHSuy3YnokzfFopfx+MAt5lVVnVpS6w2Avv+svHk=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/project-flogo/core v0.9.0-beta.1 h1:tiRv5Lv6U1SnDJh6vB10y8AnEdF8/Zmahj8WgCDqS6I=
github.com/project-flogo/core v0.9.0-beta.1/go.mod h1:dzmBbQfNNC0g0KClKYQxxGJLe53MHafg75Vhmw2TW8U=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
Expand Down
30 changes: 8 additions & 22 deletions activity/actreturn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,21 @@ weight: 4602
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).

## Installation

### Flogo Web
This activity comes out of the box with the Flogo Web UI

### Flogo CLI
```bash
flogo install github.com/project-flogo/contrib/activity/actreturn
```

## Metadata
```json
{
"settings":[
{
"name": "mappings",
"type": "object",
"required": true,
"display": {
"name": "Mapper",
"type": "mapper",
"mapperOutputScope" : "action.output"
}
}
]
}
```
### Details
#### Settings:
| Setting | Required | Description |
|:------------|:---------|:------------|
| mappings | true | An set of mappings that are executed when the activity runs |
## Configuration

### Settings:
| Name | Type | Description
|:--- | :--- | :---
| mappings | object | Set of mappings to execute when the activity runs


## Example
Expand Down
2 changes: 1 addition & 1 deletion activity/actreturn/activity.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func init() {
}

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

var activityMd = activity.ToMetadata(&Settings{})
Expand Down
2 changes: 1 addition & 1 deletion activity/actreturn/activity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func newActionContext() *test.TestActivityHost {

ac := &test.TestActivityHost{
HostId: "1",
HostRef: "github.com/TIBCOSoftware/flogo-contrib/action/flow",
HostRef: "github.com/project-flogo/flow",
IoMetadata: &metadata.IOMetadata{Input: input, Output: output},
HostData: data.NewSimpleScope(nil, nil),
}
Expand Down
3 changes: 2 additions & 1 deletion activity/actreturn/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"name": "Mapper",
"type": "mapper",
"mapperOutputScope" : "action.output"
}
},
"description": "Set of mappings to execute when the activity runs"
}
]
}
4 changes: 2 additions & 2 deletions activity/actreturn/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/project-flogo/contrib/activity/actreturn

require (
github.com/project-flogo/core v0.9.0-alpha.6
github.com/stretchr/testify v1.2.2
github.com/project-flogo/core v0.9.0-beta.1
github.com/stretchr/testify v1.3.0
)
14 changes: 7 additions & 7 deletions activity/actreturn/go.sum
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/project-flogo/core v0.9.0-alpha.6 h1:ugQmmE1WQ75gzHwFpIv7Wbt1wTqNmWj94J8t6sKdKPw=
github.com/project-flogo/core v0.9.0-alpha.6/go.mod h1:eB+hMcq51lOIeJ93K8Nvvm/vC3OI60ZaEgBbA4gtk8k=
github.com/square-it/jsonschema v1.9.1/go.mod h1:80WJHSuy3YnokzfFopfx+MAt5lVVnVpS6w2Avv+svHk=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/project-flogo/core v0.9.0-beta.1 h1:tiRv5Lv6U1SnDJh6vB10y8AnEdF8/Zmahj8WgCDqS6I=
github.com/project-flogo/core v0.9.0-beta.1/go.mod h1:dzmBbQfNNC0g0KClKYQxxGJLe53MHafg75Vhmw2TW8U=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
Expand Down
34 changes: 10 additions & 24 deletions activity/channel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,22 @@ weight: 4603
-->

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


## Installation

### Flogo CLI
```bash
flogo install github.com/project-flogo/contrib/activity/channel
```

## Metadata
```json
{
"input":[
{
"name": "channel",
"type": "string",
"required": true
},
{
"name": "data",
"type": "interface{}",
"required": true
}
]
}
```
### Details
#### Input:
| Name | Required | Description |
|:------------|:---------|:------------|
| channel | true | The channel to put the value on |
| data | true | The data to put on the channel |
## Configuration

### Input:
| Name | Type | Description
|:--- | :--- | :---
| channel | string | The name of channel to use - **REQUIRED**
| value | any | The data to put on the channel

6 changes: 4 additions & 2 deletions activity/channel/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@
{
"name": "channel",
"type": "string",
"required": true
"required": true,
"description": "The name of channel to use"
},
{
"name": "value",
"type": "any"
"type": "any",
"description": "The data to put on the channel"
}
]
}
4 changes: 2 additions & 2 deletions activity/channel/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/project-flogo/contrib/activity/channel

require (
github.com/project-flogo/core v0.9.0-alpha.6
github.com/stretchr/testify v1.2.2
github.com/project-flogo/core v0.9.0-beta.1
github.com/stretchr/testify v1.3.0
)
14 changes: 7 additions & 7 deletions activity/channel/go.sum
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/project-flogo/core v0.9.0-alpha.6 h1:ugQmmE1WQ75gzHwFpIv7Wbt1wTqNmWj94J8t6sKdKPw=
github.com/project-flogo/core v0.9.0-alpha.6/go.mod h1:eB+hMcq51lOIeJ93K8Nvvm/vC3OI60ZaEgBbA4gtk8k=
github.com/square-it/jsonschema v1.9.1/go.mod h1:80WJHSuy3YnokzfFopfx+MAt5lVVnVpS6w2Avv+svHk=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/project-flogo/core v0.9.0-beta.1 h1:tiRv5Lv6U1SnDJh6vB10y8AnEdF8/Zmahj8WgCDqS6I=
github.com/project-flogo/core v0.9.0-beta.1/go.mod h1:dzmBbQfNNC0g0KClKYQxxGJLe53MHafg75Vhmw2TW8U=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
Expand Down
8 changes: 2 additions & 6 deletions activity/channel/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ import (
"github.com/project-flogo/core/data/coerce"
)

type Settings struct {
Channel string `md:"channel,required"`
}

type Input struct {
Channel string `md:"channel,required"`
Data interface{} `md:"data"`
Channel string `md:"channel,required"` //The name of channel to use
Data interface{} `md:"data"` //The data to put on the channel
}

func (i *Input) ToMap() map[string]interface{} {
Expand Down
47 changes: 14 additions & 33 deletions activity/counter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,30 @@ weight: 4609
This activity allows you to use a global counter.

## Installation

### Flogo Web
This activity comes out of the box with the Flogo Web UI

### Flogo CLI
```bash
flogo install github.com/project-flogo/contrib/activity/counter
```

## Metadata
```json
{
"settings":[
{
"name": "counterName",
"type": "string",
"required": true
},
{
"name": "op",
"type": "string",
"allowed" : ["get", "increment", "reset"]
}
],
"output": [
{
"name": "value",
"type": "integer"
}
]
}
```
### Details
#### Settings:
| Setting | Required | Description |
|:------------|:---------|:------------|
| counterName | true | The name of the counter |
| op | false | Counter operation, 'get' is the default operation|
## Configuration

#### Output:
|Name | Description |
|:--------|:------------|
| value | the result of the counter operation
### Settings:
| Name | Type | Description
|:--- | :--- | :---
| counterName | string | The name of the counter - **REQUIRED**
| op | string | The counter operation, 'get' is the default operation

### Output:
| Name | Type | Description
|:--- | :--- | :---
| value | int | The result of the counter operation

## Examples

### Increment
The below example increments a 'messages' counter:

Expand Down
Loading

0 comments on commit 0ee27a9

Please sign in to comment.