Documentation ¶
Index ¶
- func GetDataResolver() data.Resolver
- func SetLinkExprManagerFactory(factory LinkExprManagerFactory)
- func SetMapperFactory(factory MapperFactory)
- type ActivityConfig
- func (ac *ActivityConfig) GetInputAttr(attrName string) (attr *data.Attribute, exists bool)
- func (ac *ActivityConfig) GetOutputAttr(attrName string) (attr *data.Attribute, exists bool)
- func (ac *ActivityConfig) GetSetting(setting string) (attr *data.Attribute, exists bool)
- func (ac *ActivityConfig) InputMapper() data.Mapper
- func (ac *ActivityConfig) OutputMapper() data.Mapper
- func (ac *ActivityConfig) Ref() string
- type ActivityConfigRep
- type BasicMapperFactory
- func (mf *BasicMapperFactory) GetDefaultActivityOutputMapper(task *Task) data.Mapper
- func (mf *BasicMapperFactory) GetDefaultTaskOutputMapper(task *Task) data.Mapper
- func (mf *BasicMapperFactory) NewActivityInputMapper(task *Task, mapperDef *data.MapperDef) data.Mapper
- func (mf *BasicMapperFactory) NewActivityOutputMapper(task *Task, mapperDef *data.MapperDef) data.Mapper
- func (mf *BasicMapperFactory) NewMapper(mapperDef *MapperDef) data.Mapper
- func (mf *BasicMapperFactory) NewTaskInputMapper(task *Task, mapperDef *MapperDef) data.Mapper
- func (mf *BasicMapperFactory) NewTaskOutputMapper(task *Task, mapperDef *MapperDef) data.Mapper
- type DefaultActivityOutputMapper
- type DefaultTaskOutputMapper
- type Definition
- func (d *Definition) ExplicitReply() bool
- func (d *Definition) GetAttr(attrName string) (attr *data.Attribute, exists bool)
- func (d *Definition) GetErrorHandler() *ErrorHandler
- func (d *Definition) GetLink(linkID int) *Link
- func (d *Definition) GetLinkExprManager() LinkExprManager
- func (d *Definition) GetTask(taskID string) *Task
- func (d *Definition) Links() []*Link
- func (d *Definition) Metadata() *data.IOMetadata
- func (d *Definition) ModelID() string
- func (d *Definition) Name() string
- func (d *Definition) SetLinkExprManager(mgr LinkExprManager)
- func (d *Definition) Tasks() []*Task
- type DefinitionRep
- type DummyTaskCtx
- func (*DummyTaskCtx) ActivityHost() activity.Host
- func (*DummyTaskCtx) FlowDetails() activity.FlowDetails
- func (*DummyTaskCtx) GetInitValue(key string) (value interface{}, exists bool)
- func (*DummyTaskCtx) GetInput(name string) interface{}
- func (*DummyTaskCtx) GetOutput(name string) interface{}
- func (ctx *DummyTaskCtx) GetSetting(setting string) (value interface{}, exists bool)
- func (*DummyTaskCtx) GetSharedTempData() map[string]interface{}
- func (ctx *DummyTaskCtx) Name() string
- func (*DummyTaskCtx) SetOutput(name string, value interface{})
- func (ctx *DummyTaskCtx) TaskName() string
- type ErrorHandler
- type ErrorHandlerRep
- type FlowResolver
- type Link
- type LinkExprError
- type LinkExprManager
- type LinkExprManagerFactory
- type LinkRep
- type LinkRepOld
- type LinkType
- type MapperDef
- type MapperFactory
- type Mappings
- type Provider
- type Task
- func (task *Task) ActivityConfig() *ActivityConfig
- func (task *Task) FromLinks() []*Link
- func (task *Task) GetAttr(attrName string) (attr *data.Attribute, exists bool)
- func (task *Task) GetInputAttr(attrName string) (attr *data.Attribute, exists bool)
- func (task *Task) GetOutputAttr(attrName string) (attr *data.Attribute, exists bool)
- func (task *Task) GetSetting(attrName string) (value interface{}, exists bool)
- func (task *Task) ID() string
- func (task *Task) IsScope() bool
- func (task *Task) Name() string
- func (task *Task) String() string
- func (task *Task) ToLinks() []*Link
- func (task *Task) TypeID() string
- type TaskRep
- type TaskRepOld
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDataResolver ¶
func SetLinkExprManagerFactory ¶
func SetLinkExprManagerFactory(factory LinkExprManagerFactory)
func SetMapperFactory ¶
func SetMapperFactory(factory MapperFactory)
Types ¶
type ActivityConfig ¶ added in v0.5.2
func (*ActivityConfig) GetInputAttr ¶ added in v0.5.2
func (ac *ActivityConfig) GetInputAttr(attrName string) (attr *data.Attribute, exists bool)
GetAttr gets the specified input attribute
func (*ActivityConfig) GetOutputAttr ¶ added in v0.5.2
func (ac *ActivityConfig) GetOutputAttr(attrName string) (attr *data.Attribute, exists bool)
GetOutputAttr gets the specified output attribute
func (*ActivityConfig) GetSetting ¶ added in v0.5.2
func (ac *ActivityConfig) GetSetting(setting string) (attr *data.Attribute, exists bool)
GetSetting gets the specified setting
func (*ActivityConfig) InputMapper ¶ added in v0.5.2
func (ac *ActivityConfig) InputMapper() data.Mapper
InputMapper returns the InputMapper of the task
func (*ActivityConfig) OutputMapper ¶ added in v0.5.2
func (ac *ActivityConfig) OutputMapper() data.Mapper
OutputMapper returns the OutputMapper of the task
func (*ActivityConfig) Ref ¶ added in v0.5.2
func (ac *ActivityConfig) Ref() string
type ActivityConfigRep ¶ added in v0.5.2
type ActivityConfigRep struct { Ref string `json:"ref"` Mappings *Mappings `json:"mappings,omitempty"` Settings map[string]interface{} `json:"settings"` InputAttrs map[string]interface{} `json:"input,omitempty"` OutputAttrs map[string]interface{} `json:"output,omitempty"` }
ActivityConfigRep is a serializable representation of an activity configuration
type BasicMapperFactory ¶
type BasicMapperFactory struct {
// contains filtered or unexported fields
}
func (*BasicMapperFactory) GetDefaultActivityOutputMapper ¶ added in v0.5.2
func (mf *BasicMapperFactory) GetDefaultActivityOutputMapper(task *Task) data.Mapper
func (*BasicMapperFactory) GetDefaultTaskOutputMapper ¶
func (mf *BasicMapperFactory) GetDefaultTaskOutputMapper(task *Task) data.Mapper
Deprecated
func (*BasicMapperFactory) NewActivityInputMapper ¶ added in v0.5.2
func (*BasicMapperFactory) NewActivityOutputMapper ¶ added in v0.5.2
func (*BasicMapperFactory) NewMapper ¶
func (mf *BasicMapperFactory) NewMapper(mapperDef *MapperDef) data.Mapper
func (*BasicMapperFactory) NewTaskInputMapper ¶
func (mf *BasicMapperFactory) NewTaskInputMapper(task *Task, mapperDef *MapperDef) data.Mapper
Deprecated
func (*BasicMapperFactory) NewTaskOutputMapper ¶
func (mf *BasicMapperFactory) NewTaskOutputMapper(task *Task, mapperDef *MapperDef) data.Mapper
Deprecated
type DefaultActivityOutputMapper ¶ added in v0.5.2
type DefaultActivityOutputMapper struct {
// contains filtered or unexported fields
}
BasicMapper is a simple object holding and executing mappings
type DefaultTaskOutputMapper ¶ added in v0.5.2
type DefaultTaskOutputMapper struct {
// contains filtered or unexported fields
}
BasicMapper is a simple object holding and executing mappings Deprecated
type Definition ¶
type Definition struct {
// contains filtered or unexported fields
}
Definition is the object that describes the definition of a flow. It contains its data (attributes) and structure (tasks & links).
func NewDefinition ¶
func NewDefinition(rep *DefinitionRep) (def *Definition, err error)
NewDefinition creates a flow Definition from a serializable definition representation
func (*Definition) ExplicitReply ¶
func (d *Definition) ExplicitReply() bool
func (*Definition) GetAttr ¶
func (d *Definition) GetAttr(attrName string) (attr *data.Attribute, exists bool)
GetAttr gets the specified attribute
func (*Definition) GetErrorHandler ¶ added in v0.5.2
func (d *Definition) GetErrorHandler() *ErrorHandler
func (*Definition) GetLink ¶
func (d *Definition) GetLink(linkID int) *Link
GetLink returns the link with the specified ID
func (*Definition) GetLinkExprManager ¶
func (d *Definition) GetLinkExprManager() LinkExprManager
GetLinkExprManager gets the LinkOld Expression Manager for the definition
func (*Definition) GetTask ¶
func (d *Definition) GetTask(taskID string) *Task
GetTask returns the task with the specified ID
func (*Definition) Links ¶ added in v0.5.2
func (d *Definition) Links() []*Link
func (*Definition) Metadata ¶ added in v0.5.2
func (d *Definition) Metadata() *data.IOMetadata
Metadata returns IO metadata for the flow
func (*Definition) ModelID ¶
func (d *Definition) ModelID() string
ModelID returns the ID of the model the definition uses
func (*Definition) Name ¶
func (d *Definition) Name() string
Name returns the name of the definition
func (*Definition) SetLinkExprManager ¶
func (d *Definition) SetLinkExprManager(mgr LinkExprManager)
SetLinkExprManager sets the LinkOld Expression Manager for the definition
func (*Definition) Tasks ¶ added in v0.5.2
func (d *Definition) Tasks() []*Task
GetTask returns the task with the specified ID
type DefinitionRep ¶
type DefinitionRep struct { ExplicitReply bool `json:"explicitReply"` Name string `json:"name"` ModelID string `json:"model"` Metadata *data.IOMetadata `json:"metadata"` Attributes []*data.Attribute `json:"attributes,omitempty"` Tasks []*TaskRep `json:"tasks"` Links []*LinkRep `json:"links"` ErrorHandler *ErrorHandlerRep `json:"errorHandler"` //deprecated RootTask *TaskRepOld `json:"rootTask"` ErrorHandlerTask *TaskRepOld `json:"errorHandlerTask"` }
DefinitionRep is a serializable representation of a flow Definition
type DummyTaskCtx ¶ added in v0.5.2
type DummyTaskCtx struct {
// contains filtered or unexported fields
}
func (*DummyTaskCtx) ActivityHost ¶ added in v0.5.2
func (*DummyTaskCtx) ActivityHost() activity.Host
func (*DummyTaskCtx) FlowDetails ¶ added in v0.5.2
func (*DummyTaskCtx) FlowDetails() activity.FlowDetails
func (*DummyTaskCtx) GetInitValue ¶ added in v0.5.2
func (*DummyTaskCtx) GetInitValue(key string) (value interface{}, exists bool)
func (*DummyTaskCtx) GetInput ¶ added in v0.5.2
func (*DummyTaskCtx) GetInput(name string) interface{}
func (*DummyTaskCtx) GetOutput ¶ added in v0.5.2
func (*DummyTaskCtx) GetOutput(name string) interface{}
func (*DummyTaskCtx) GetSetting ¶ added in v0.5.2
func (ctx *DummyTaskCtx) GetSetting(setting string) (value interface{}, exists bool)
func (*DummyTaskCtx) GetSharedTempData ¶ added in v0.5.6
func (*DummyTaskCtx) GetSharedTempData() map[string]interface{}
func (*DummyTaskCtx) Name ¶ added in v0.5.2
func (ctx *DummyTaskCtx) Name() string
func (*DummyTaskCtx) SetOutput ¶ added in v0.5.2
func (*DummyTaskCtx) SetOutput(name string, value interface{})
func (*DummyTaskCtx) TaskName ¶ added in v0.5.2
func (ctx *DummyTaskCtx) TaskName() string
type ErrorHandler ¶ added in v0.5.2
type ErrorHandler struct {
// contains filtered or unexported fields
}
func (*ErrorHandler) Tasks ¶ added in v0.5.2
func (eh *ErrorHandler) Tasks() []*Task
type ErrorHandlerRep ¶ added in v0.5.2
ErrorHandlerRep is a serializable representation of the error flow
type FlowResolver ¶
type FlowResolver struct { }
type Link ¶
type Link struct {
// contains filtered or unexported fields
}
LinkOld is the object that describes the definition of a link.
func GetExpressionLinks ¶
func GetExpressionLinks(def *Definition) []*Link
GetExpressionLinks gets the links of the definition that are of type LtExpression
type LinkExprError ¶
type LinkExprError struct {
// contains filtered or unexported fields
}
LinkExprError thrown if error is encountered evaluating an link expression
func NewLinkExprError ¶
func NewLinkExprError(msg string) *LinkExprError
func (*LinkExprError) Error ¶
func (e *LinkExprError) Error() string
type LinkExprManager ¶
type LinkExprManager interface { // EvalLinkExpr evaluate the link expression EvalLinkExpr(link *Link, scope data.Scope) (bool, error) }
LinkExprManager interface that defines a Link Expression Manager
type LinkExprManagerFactory ¶
type LinkExprManagerFactory interface {
NewLinkExprManager() LinkExprManager
}
func GetLinkExprManagerFactory ¶
func GetLinkExprManagerFactory() LinkExprManagerFactory
type LinkRep ¶
type LinkRep struct { Type string `json:"type"` Name string `json:"name"` ToID string `json:"to"` FromID string `json:"from"` Value string `json:"value"` }
LinkRep is a serializable representation of a flow LinkOld
type LinkRepOld ¶ added in v0.5.2
type LinkRepOld struct { ID int `json:"id"` Type int `json:"type"` Name string `json:"name"` // Using interface{} type to support backward compatibility changes since Id was // int before, change to string once BC is removed ToID interface{} `json:"to"` // Using interface{} type to support backward compatibility changes since Id was // int before, change to string once BC is removed FromID interface{} `json:"from"` Value string `json:"value"` }
LinkRepOld is a serializable representation of a flow LinkOld Deprecated
type LinkType ¶
type LinkType int
LinkType is an enum for possible Link Types
const ( // LtDependency denotes an normal dependency link LtDependency LinkType = 0 // LtExpression denotes a link with an expression LtExpression LinkType = 1 //expr language on the model or def? // LtLabel denotes 'label' link LtLabel LinkType = 2 // LtError denotes an error link LtError LinkType = 3 )
type MapperDef ¶
type MapperDef struct {
Mappings []*data.MappingDef
}
MapperDef represents a Mapper, which is a collection of mappings
type MapperFactory ¶
type MapperFactory interface { // NewMapper creates a new Mapper from the specified MapperDef NewMapper(mapperDef *MapperDef) data.Mapper // NewActivityInputMapper creates a new Activity Input Mapper from the specified MapperDef // for the specified Task, method to facilitate pre-compiled mappers NewActivityInputMapper(task *Task, mapperDef *data.MapperDef) data.Mapper // NewActivityOutputMapper creates a new Activity Output Mapper from the specified MapperDef // for the specified Task, method to facilitate pre-compiled mappers NewActivityOutputMapper(task *Task, mapperDef *data.MapperDef) data.Mapper // GetDefaultTaskOutputMapper get the default Activity Output Mapper for the // specified Task GetDefaultActivityOutputMapper(task *Task) data.Mapper // NewTaskInputMapper creates a new Input Mapper from the specified MapperDef // for the specified Task, method to facilitate pre-compiled mappers //Deprecated NewTaskInputMapper(task *Task, mapperDef *MapperDef) data.Mapper // NewTaskOutputMapper creates a new Output Mapper from the specified MapperDef // for the specified Task, method to facilitate pre-compiled mappers //Deprecated NewTaskOutputMapper(task *Task, mapperDef *MapperDef) data.Mapper // GetDefaultTaskOutputMapper get the default Output Mapper for the // specified Task //Deprecated GetDefaultTaskOutputMapper(task *Task) data.Mapper }
func GetMapperFactory ¶
func GetMapperFactory() MapperFactory
type Mappings ¶
type Mappings struct { Input []*data.MappingDef `json:"input,omitempty"` Output []*data.MappingDef `json:"output,omitempty"` }
Mappings is a collection of input & output mappings
type Provider ¶ added in v0.5.2
type Provider interface { // GetFlow retrieves the flow definition for the specified uri GetFlow(flowURI string) (*DefinitionRep, error) }
ExtensionProvider is the interface that describes an object that can provide flow definitions from a URI
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task is the object that describes the definition of a task. It contains its data (attributes) and its nested structure (child tasks & child links).
func (*Task) ActivityConfig ¶ added in v0.5.2
func (task *Task) ActivityConfig() *ActivityConfig
func (*Task) GetInputAttr ¶
GetAttr gets the specified input attribute
func (*Task) GetOutputAttr ¶
GetOutputAttr gets the specified output attribute
func (*Task) GetSetting ¶
func (*Task) IsScope ¶
IsScope returns flag indicating if the Task is a scope task (a container of attributes)
type TaskRep ¶
type TaskRep struct { ID string `json:"id"` Type string `json:"type"` Name string `json:"name"` Settings map[string]interface{} `json:"settings"` ActivityCfgRep *ActivityConfigRep `json:"activity"` }
TaskRep is a serializable representation of a flow task
type TaskRepOld ¶ added in v0.5.2
type TaskRepOld struct { // Using interface{} type to support backward compatibility changes since Id was // int before, change to string once BC is removed ID interface{} `json:"id"` TypeID int `json:"type"` ActivityRef string `json:"activityRef"` Name string `json:"name"` Tasks []*TaskRepOld `json:"tasks,omitempty"` Links []*LinkRepOld `json:"links,omitempty"` Mappings *Mappings `json:"mappings,omitempty"` InputAttrs map[string]interface{} `json:"input,omitempty"` OutputAttrs map[string]interface{} `json:"output,omitempty"` Settings map[string]interface{} `json:"settings"` //keep temporarily for backwards compatibility InputAttrsOld map[string]interface{} `json:"inputs,omitempty"` OutputAttrsOld map[string]interface{} `json:"outputs,omitempty"` InputMappings []*data.MappingDef `json:"inputMappings,omitempty"` OutputMappings []*data.MappingDef `json:"outputMappings,omitempty"` Attributes []*data.Attribute `json:"attributes,omitempty"` ActivityType string `json:"activityType"` }
TaskRepOld is a serializable representation of a flow TaskOld Deprecated