app

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

README

tibco-app

This activity provides your Flogo application the ability to use a global attributes.

Installation

flogo add activity github.com/TIBCOSoftware/flogo-contrib/activity/app

Schema

Inputs and Outputs:

{
  "inputs":[
    {
      "name": "attribute",
      "type": "string",
      "required": true
    },
    {
      "name": "operation",
      "type": "string",
      "required" : true,
      "allowed" : ["ADD","GET","UPDATE"]
    },
    {
      "name": "type",
      "type": "string",
      "allowed" : [	"string", "integer", "number", "boolean", "object", "array", "params"]
    },
    {
      "name": "value",
      "type": "any"
    }
  ],
  "outputs": [
    {
      "name": "value",
      "type": "any"
    }
  ]
}

Settings

Setting Description
attribute The name of the attribute
operation The operation to perform
type The type of the attribute, only used with NEW operation
value The value of the attribute, only used with ADD and UPDATE

Configuration Examples

New

Configure a task to add a new 'myAttr' attribute:

{
  "id": 3,
  "type": 1,
  "activityType": "tibco-app",
  "name": "Add myAttr to application",
  "attributes": [
    { "name": "attribute", "value": "myAttr" },
    { "name": "operation", "value": "NEW" },
    { "name": "type", "value": "string" },
    { "name": "value", "value": "test" },    
  ]
}
Get

Configure a task to get the 'myAttr' attribute:

{
  "id": 3,
  "type": 1,
  "activityType": "tibco-app",
  "name": "Get myAttr from Application",
  "attributes": [
      { "name": "attribute", "value": "myAttr" },
      { "name": "operation", "value": "GET" },
  ]
}
Update

Configure a task to update the 'myAttr' attribute:

{
  "id": 3,
  "type": 1,
  "activityType": "tibco-app",
  "name": "Update myAttr Application attribute",
  "attributes": [
    { "name": "attribute", "value": "myAttr" },
    { "name": "operation", "value": "UDPATE" },
    { "name": "value", "value": "test" },    
  ]
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

NewActivity creates a new AppActivity

Types

type AppActivity

type AppActivity struct {
	sync.Mutex
	// contains filtered or unexported fields
}

AppActivity is a App Activity implementation

func (*AppActivity) Eval

func (a *AppActivity) Eval(context activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval

func (*AppActivity) Metadata

func (a *AppActivity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL