Documentation ¶
Index ¶
- Constants
- func NewTestModel() *model.FlowModel
- type SimpleFlowBehavior
- type SimpleLinkBehavior
- type SimpleTaskBehavior
- func (b *SimpleTaskBehavior) ChildDone(context model.TaskContext, childTask *definition.Task, childDoneCode int) (done bool, doneCode int)
- func (b *SimpleTaskBehavior) Done(context model.TaskContext, doneCode int) (notifyParent bool, childDoneCode int, taskEntries []*model.TaskEntry, ...)
- func (b *SimpleTaskBehavior) Enter(context model.TaskContext, enterCode int) (eval bool, evalCode int)
- func (b *SimpleTaskBehavior) Error(context model.TaskContext) (handled bool, taskEntry *model.TaskEntry)
- func (b *SimpleTaskBehavior) Eval(context model.TaskContext, evalCode int) (evalResult model.EvalResult, doneCode int, err error)
- func (b *SimpleTaskBehavior) PostEval(context model.TaskContext, evalCode int, data interface{}) (done bool, doneCode int, err error)
- type TestActionCtx
- func (ac *TestActionCtx) GetResolver() data.Resolver
- func (ac *TestActionCtx) ID() string
- func (ac *TestActionCtx) InstanceMetadata() *action.ConfigMetadata
- func (ac *TestActionCtx) Ref() string
- func (ac *TestActionCtx) Reply(data map[string]*data.Attribute, err error)
- func (ac *TestActionCtx) Return(data map[string]*data.Attribute, err error)
- func (ac *TestActionCtx) WorkingData() data.Scope
- type TestActivityContext
- func (c *TestActivityContext) ActionContext() action.Context
- func (c *TestActivityContext) FlowDetails() activity.FlowDetails
- func (c *TestActivityContext) GetAttrType(attrName string) (attrType data.Type, exists bool)
- func (c *TestActivityContext) GetAttrValue(attrName string) (value string, exists bool)
- func (c *TestActivityContext) GetInput(name string) interface{}
- func (c *TestActivityContext) GetOutput(name string) interface{}
- func (c *TestActivityContext) SetAttrValue(attrName string, value string)
- func (c *TestActivityContext) SetInput(name string, value interface{})
- func (c *TestActivityContext) SetOutput(name string, value interface{})
- func (c *TestActivityContext) TaskName() string
- type TestFlowDetails
Constants ¶
const ( STATE_NOT_STARTED int = 0 STATE_LINK_FALSE int = 1 STATE_LINK_TRUE int = 2 STATE_ENTERED int = 10 STATE_READY int = 20 STATE_WAITING int = 30 STATE_DONE int = 40 )
////////////////////////////////////////////////////////////////////////////////////////////////////// State
Variables ¶
This section is empty.
Functions ¶
func NewTestModel ¶
Types ¶
type SimpleFlowBehavior ¶
type SimpleFlowBehavior struct { }
func (*SimpleFlowBehavior) Done ¶
func (b *SimpleFlowBehavior) Done(context model.FlowContext)
func (*SimpleFlowBehavior) Resume ¶
func (b *SimpleFlowBehavior) Resume(context model.FlowContext) bool
func (*SimpleFlowBehavior) Start ¶
func (b *SimpleFlowBehavior) Start(context model.FlowContext) (start bool, evalCode int)
func (*SimpleFlowBehavior) TasksDone ¶
func (b *SimpleFlowBehavior) TasksDone(context model.FlowContext, doneCode int)
type SimpleLinkBehavior ¶
type SimpleLinkBehavior struct { }
type SimpleTaskBehavior ¶
type SimpleTaskBehavior struct { }
func (*SimpleTaskBehavior) ChildDone ¶
func (b *SimpleTaskBehavior) ChildDone(context model.TaskContext, childTask *definition.Task, childDoneCode int) (done bool, doneCode int)
func (*SimpleTaskBehavior) Done ¶
func (b *SimpleTaskBehavior) Done(context model.TaskContext, doneCode int) (notifyParent bool, childDoneCode int, taskEntries []*model.TaskEntry, err error)
func (*SimpleTaskBehavior) Enter ¶
func (b *SimpleTaskBehavior) Enter(context model.TaskContext, enterCode int) (eval bool, evalCode int)
func (*SimpleTaskBehavior) Error ¶
func (b *SimpleTaskBehavior) Error(context model.TaskContext) (handled bool, taskEntry *model.TaskEntry)
func (*SimpleTaskBehavior) Eval ¶
func (b *SimpleTaskBehavior) Eval(context model.TaskContext, evalCode int) (evalResult model.EvalResult, doneCode int, err error)
func (*SimpleTaskBehavior) PostEval ¶
func (b *SimpleTaskBehavior) PostEval(context model.TaskContext, evalCode int, data interface{}) (done bool, doneCode int, err error)
type TestActionCtx ¶
type TestActionCtx struct { ActionId string ActionRef string ActionMd *action.ConfigMetadata ActionData data.Scope ReplyData map[string]interface{} ReplyDataAttr map[string]*data.Attribute ReplyErr error }
func (*TestActionCtx) GetResolver ¶
func (ac *TestActionCtx) GetResolver() data.Resolver
func (*TestActionCtx) ID ¶
func (ac *TestActionCtx) ID() string
func (*TestActionCtx) InstanceMetadata ¶
func (ac *TestActionCtx) InstanceMetadata() *action.ConfigMetadata
func (*TestActionCtx) Ref ¶
func (ac *TestActionCtx) Ref() string
func (*TestActionCtx) Reply ¶
func (ac *TestActionCtx) Reply(data map[string]*data.Attribute, err error)
func (*TestActionCtx) Return ¶
func (ac *TestActionCtx) Return(data map[string]*data.Attribute, err error)
func (*TestActionCtx) WorkingData ¶
func (ac *TestActionCtx) WorkingData() data.Scope
type TestActivityContext ¶
type TestActivityContext struct { ACtx *TestActionCtx TaskNameVal string Attrs map[string]*data.Attribute // contains filtered or unexported fields }
TestActivityContext is a dummy ActivityContext to assist in testing
func NewTestActivityContext ¶
func NewTestActivityContext(metadata *activity.Metadata) *TestActivityContext
NewTestActivityContext creates a new TestActivityContext
func NewTestActivityContextWithAction ¶
func NewTestActivityContextWithAction(metadata *activity.Metadata, actionCtx *TestActionCtx) *TestActivityContext
NewTestActivityContextWithAction creates a new TestActivityContext
func (*TestActivityContext) ActionContext ¶
func (c *TestActivityContext) ActionContext() action.Context
func (*TestActivityContext) FlowDetails ¶
func (c *TestActivityContext) FlowDetails() activity.FlowDetails
FlowDetails implements activity.Context.FlowDetails
func (*TestActivityContext) GetAttrType ¶
func (c *TestActivityContext) GetAttrType(attrName string) (attrType data.Type, exists bool)
GetAttrType implements data.Scope.GetAttrType
func (*TestActivityContext) GetAttrValue ¶
func (c *TestActivityContext) GetAttrValue(attrName string) (value string, exists bool)
GetAttrValue implements data.Scope.GetAttrValue
func (*TestActivityContext) GetInput ¶
func (c *TestActivityContext) GetInput(name string) interface{}
GetInput implements activity.Context.GetInput
func (*TestActivityContext) GetOutput ¶
func (c *TestActivityContext) GetOutput(name string) interface{}
GetOutput implements activity.Context.GetOutput
func (*TestActivityContext) SetAttrValue ¶
func (c *TestActivityContext) SetAttrValue(attrName string, value string)
SetAttrValue implements data.Scope.SetAttrValue
func (*TestActivityContext) SetInput ¶
func (c *TestActivityContext) SetInput(name string, value interface{})
SetInput implements activity.Context.SetInput
func (*TestActivityContext) SetOutput ¶
func (c *TestActivityContext) SetOutput(name string, value interface{})
SetOutput implements activity.Context.SetOutput
func (*TestActivityContext) TaskName ¶
func (c *TestActivityContext) TaskName() string
TaskName implements activity.Context.TaskName
type TestFlowDetails ¶
TestFlowDetails simple FlowDetails for use in testing
func (*TestFlowDetails) ID ¶
func (fd *TestFlowDetails) ID() string
ID implements activity.FlowDetails.ID
func (*TestFlowDetails) Name ¶
func (fd *TestFlowDetails) Name() string
Name implements activity.FlowDetails.Name
func (*TestFlowDetails) ReplyHandler ¶
func (fd *TestFlowDetails) ReplyHandler() activity.ReplyHandler
ReplyHandler implements activity.FlowDetails.ReplyHandler