activity_mapper

package module
v0.10.1-0...-6001263 Latest Latest
Warning

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

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

README

Mapper

This activity allows you to map values to the working attribute set of an action.

Installation

Flogo CLI
flogo install github.com/r2d2-ai/contrib/activity/mapper

Configuration

Settings:
Name Type Description
mappings object Set of mappings to execute

Example

The below example allows you to configure the activity to map the output 'value' of activity 'myActivity' to FlowAttr1

{
  "id": "mapper",
  "name": "Mapper",
  "activity": {
    "ref": "github.com/r2d2-ai/contrib/activity/mapper",
    "input": {
      "mappings": 
        {
          "FlowAttr1": "=$activity[myActivity].value"
        }
      ]
    }
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Activity

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

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

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

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

func (*Activity) Metadata

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

Metadata returns the activity's metadata

type Settings

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

Jump to

Keyboard shortcuts

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