error

package module
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

README

Error

This activity allows you to cause an explicit error in the flow (throw an error).

Installation

Flogo CLI
flogo install  github.com/project-flogo/contrib/activity/error

Configuration

Input:
Name Type Description
message string The error message
data any The error data

Configuration Examples

The below example throws a simple error with a message:

{
  "id": "throw_error",
  "name": "Throw Error",
  "activity": {
    "ref": "github.com/project-flogo/contrib/activity/error",
    "input": {
      "message": "Unexpected Threshold Value"
    }
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activity

type Activity struct {
}

Activity is an Activity that used to cause an explicit error in the flow inputs : {message,data} outputs: node

func (*Activity) Eval

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

Eval returns an error

func (*Activity) Metadata

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

Metadata returns the activity's metadata

type Input

type Input struct {
	Message string      `md:"message"` // The error message
	Data    interface{} `md:"data"`    // The error data
}

func (*Input) FromMap

func (i *Input) FromMap(values map[string]interface{}) error

func (*Input) ToMap

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

Jump to

Keyboard shortcuts

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