mapper

package
v0.5.8 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

README


title: Mapper weight: 4616

Mapper

This activity allows you to map values to the working attribute set of a flow.

Installation

Flogo Web

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

Flogo CLI

flogo install github.com/TIBCOSoftware/flogo-contrib/activity/mapper

Schema

Input and Output:

{
  "input":[
    {
      "name": "mappings",
      "type": "array",
      "required": true,
      "display": {
        "name": "Mapper",
        "type": "mapper",
        "mapperOutputScope" : "action"
      }
    }
  ],
  "output": [
  ]
}

Settings

Setting Required Description
mappings True An array of mappings that are executed 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).

{
  "id": "mapper_6",
  "name": "Mapper",
  "description": "Simple Mapper Activity",
  "activity": {
    "ref": "github.com/TIBCOSoftware/flogo-contrib/activity/mapper",
    "input": {
      "mappings": [
        {
          "mapTo": "FlowAttr1",
          "type": "assign",
          "value": "$activity[log_3].message"
        }
      ]
    }
  }
}

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 MapperActivity

Types

type MapperActivity

type MapperActivity struct {
	// contains filtered or unexported fields
}

MapperActivity is an Activity that is used to reply/return via the trigger inputs : {method,uri,params} outputs: {result}

func (*MapperActivity) Eval

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

Eval implements api.Activity.Eval - Invokes a REST Operation

func (*MapperActivity) Metadata

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

Metadata returns the activity's metadata

Jump to

Keyboard shortcuts

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