support

package
v1.6.12 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserName   = "FLOGO_APP_USERNAME"
	HostName   = "FLOGO_HOST_NAME"
	AppName    = "FLOGO_APP_NAME"
	AppVersion = "FLOGO_APP_VERSION"

	PropagateSkip             = "FLOGO_TASK_PROPAGATE_SKIP"
	PropagateSkipDefault bool = true

	PrioritizeExprLink             = "FLOGO_TASK_PRIORITIZE_EXPR_LINK"
	PrioritizeExprLinkDefault bool = false
)
View Source
const (
	Primitive = 1
	Activity  = 2
)
View Source
const (
	AssertionActivity  = 1
	AssertionException = 2
	SkipActivity       = 3
	MockActivity       = 4
	MockException      = 5
)
View Source
const (
	NotExecuted          = 0
	Pass                 = 1
	Fail                 = 2
	Mocked               = 3
	AssertionNotExecuted = 4
)
View Source
const (
	ResTypeFlow = "flow"
)

Variables

This section is empty.

Functions

func GetAppName added in v1.6.0

func GetAppName() string

func GetAppVerison added in v1.6.0

func GetAppVerison() string

func GetDefinition

func GetDefinition(flowURI string) (*definition.Definition, bool, error)

func GetHostId added in v1.6.0

func GetHostId() string

func GetPrioritizeExprTask added in v1.6.5

func GetPrioritizeExprTask() bool

func GetPropagateSkip added in v1.6.4

func GetPropagateSkip() bool

func GetUserName added in v1.6.0

func GetUserName() string

func InitDefaultDefLookup

func InitDefaultDefLookup(fManager *FlowManager, rManager *resource.Manager)

func SetResource added in v1.1.0

func SetResource(resources []*resource.Config) error

Types

type ActivityCoverage added in v1.6.12

type ActivityCoverage struct {
	ActivityName string
	LinkFrom     []string
	LinkTo       []string
	Inputs       map[string]interface{} `json:"inputs,omitempty"`
	Outputs      map[string]interface{} `json:"outputs,omitempty"`
	Error        map[string]interface{} `json:"errors,omitempty"`
	FlowName     string                 `json:"flowName"`
	IsMainFlow   bool                   `json:"scope"`
}

type Assertion added in v1.6.3

type Assertion struct {
	ID         string
	Name       string
	Type       int
	Expression interface{}
	Result     int
	Message    string
	EvalResult ast.ExprEvalData
}

type BasicRemoteFlowProvider

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

func (*BasicRemoteFlowProvider) GetFlow

func (fp *BasicRemoteFlowProvider) GetFlow(flowURI string) (*definition.DefinitionRep, error)

type Coverage added in v1.6.12

type Coverage struct {
	ActivityCoverage   []*ActivityCoverage   `json:"activityCoverage,omitempty"`
	TransitionCoverage []*TransitionCoverage `json:"transitionCoverage,omitempty"`
}

type FlowLoader

type FlowLoader struct {
}

func (*FlowLoader) LoadResource

func (*FlowLoader) LoadResource(config *resource.Config) (*resource.Resource, error)

type FlowManager

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

func NewFlowManager

func NewFlowManager(flowProvider definition.Provider) *FlowManager

func (*FlowManager) GetFlow

func (fm *FlowManager) GetFlow(uri string) (*definition.Definition, error)

type Interceptor

type Interceptor struct {
	TaskInterceptors []*TaskInterceptor `json:"tasks"`

	Coverage  *Coverage `json:"coverage"`
	CollectIO bool
	// contains filtered or unexported fields
}

Interceptor contains a set of task interceptor, this can be used to override runtime data of an instance of the corresponding Flow. This can be used to modify runtime execution of a flow or in test/debug for implementing mocks for tasks

func (*Interceptor) AddToActivityCoverage added in v1.6.12

func (pi *Interceptor) AddToActivityCoverage(coverage ActivityCoverage)

func (*Interceptor) AddToLinkCoverage added in v1.6.12

func (pi *Interceptor) AddToLinkCoverage(coverage TransitionCoverage)

func (*Interceptor) GetTaskInterceptor

func (pi *Interceptor) GetTaskInterceptor(taskID string) *TaskInterceptor

GetTaskInterceptor get the TaskInterceptor for the specified task (referred to by ID)

func (*Interceptor) Init

func (pi *Interceptor) Init()

Init initializes the FlowInterceptor, usually called after deserialization

type Patch

type Patch struct {
	TaskPatches []*TaskPatch `json:"tasks"` //put in mapper object
	// contains filtered or unexported fields
}

Patch contains a set of task patches for a Flow Patch, this can be used to override the default data and mappings of a Flow

func (*Patch) GetInputMapper

func (pp *Patch) GetInputMapper(taskID string) mapper.Mapper

GetInputMapper returns the InputMapper for the specified task (referred to by ID)

func (*Patch) GetOutputMapper

func (pp *Patch) GetOutputMapper(taskID string) mapper.Mapper

GetOutputMapper returns the OutputMapper for the specified task (referred to by ID)

func (*Patch) GetPatch

func (pp *Patch) GetPatch(taskID string) *TaskPatch

GetPatch returns the Task Patch for the specified task (referred to by ID)

func (*Patch) Init

func (pp *Patch) Init()

Init initializes the FlowPatch, usually called after deserialization

type TaskInterceptor

type TaskInterceptor struct {
	ID            string                 `json:"id"`
	Skip          bool                   `json:"skip,omitempty"`
	Inputs        map[string]interface{} `json:"inputs,omitempty"`
	Outputs       map[string]interface{} `json:"outputs,omitempty"`
	Assertions    []Assertion            `json:"assertions,omitempty"`
	SkipExecution bool                   `json:"skipExecution"`
	Result        int                    `json:"result,omitempty"`
	Message       string                 `json:"message"`
	Type          int                    `json:"type"`
}

TaskInterceptor contains instance override information for a Task, such has attributes. Also, a 'Skip' flag can be enabled to inform the runtime that the task should not execute.

type TaskPatch

type TaskPatch struct {
	ID         string                 `json:"id"`
	Attributes []*data.Attribute      `json:"attributes"`
	Input      map[string]interface{} `json:"input"`
	Output     map[string]interface{} `json:"output"`

	Attrs map[string]*data.Attribute
	// contains filtered or unexported fields
}

TaskPatch contains patching information for a Task, such has attributes, input mappings, output mappings. This is used to override the corresponding settings for a Task in the Process

func (*TaskPatch) InputMapper

func (tp *TaskPatch) InputMapper() mapper.Mapper

InputMapper returns the overriding InputMapper

func (*TaskPatch) OutputMapper

func (tp *TaskPatch) OutputMapper() mapper.Mapper

OutputMapper returns the overriding OutputMapper

type TransitionCoverage added in v1.6.12

type TransitionCoverage struct {
	TransitionName       string `json:"transitionName"`
	TransitionType       string `json:"transitionType"`
	TransitionFrom       string `json:"transitionFrom"`
	TransitionTo         string `json:"transitionTo"`
	TransitionExpression string `json:"transitionExpression"`
	FlowName             string `json:"flowName"`
	IsMainFlow           bool   `json:"scope"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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