error

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

README


title: Error weight: 4610

Error

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

Installation

Flogo Web

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

Flogo CLI

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

Schema

Inputs and Outputs:

{
  "input":[
    {
      "name": "message",
      "type": "string"
    },
    {
      "name": "data",
      "type": "object"
    }
  ],
  "output": [
  ]
}

Settings

Setting Required Description
message False The error message you want to throw
data False The error data you want to throw

Configuration Examples

The below example throws a simple error with a message:

{
  "id": "error_1",
  "name": "Throw Error",
  "description": "Simple Error Activity",
  "activity": {
    "ref": "github.com/TIBCOSoftware/flogo-contrib/activity/error",
    "input": {
      "message": "Unexpected Threshold Value"
    }
  }
}

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 ErrorActivity

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

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

func (*ErrorActivity) Eval

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

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

func (*ErrorActivity) Metadata

func (a *ErrorActivity) 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