Versions in this module Expand all Collapse all v0 v0.5.1 Feb 1, 2018 Changes in this version + func Register(model *FlowModel) + type EvalResult int + const EVAL_DONE + const EVAL_FAIL + const EVAL_REPEAT + const EVAL_WAIT + type FlowBehavior interface + Done func(context FlowContext) + Resume func(context FlowContext) bool + Start func(context FlowContext) (start bool, evalCode int) + TasksDone func(context FlowContext, doneCode int) + type FlowContext interface + FlowDefinition func() *definition.Definition + SetState func(state int) + State func() int + type FlowModel struct + func Get(id string) *FlowModel + func New(name string) *FlowModel + func Registered() []*FlowModel + func (pm *FlowModel) GetFlowBehavior() FlowBehavior + func (pm *FlowModel) GetTaskBehavior(id int) TaskBehavior + func (pm *FlowModel) Name() string + func (pm *FlowModel) RegisterFlowBehavior(flowBehavior FlowBehavior) + func (pm *FlowModel) RegisterTaskBehavior(id int, taskBehavior TaskBehavior) + type LinkInst interface + Link func() *definition.Link + SetState func(state int) + State func() int + type TaskBehavior interface + ChildDone func(context TaskContext, childTask *definition.Task, childDoneCode int) (done bool, doneCode int) + Done func(context TaskContext, doneCode int) (notifyParent bool, childDoneCode int, taskEntries []*TaskEntry, err error) + Enter func(context TaskContext, enterCode int) (eval bool, evalCode int) + Error func(context TaskContext) (handled bool, taskEntry *TaskEntry) + Eval func(context TaskContext, evalCode int) (evalResult EvalResult, doneCode int, err error) + PostEval func(context TaskContext, evalCode int, data interface{}) (done bool, doneCode int, err error) + type TaskContext interface + AddWorkingData func(attr *data.Attribute) + ChildTaskInsts func() (taskInsts []TaskInst, hasChildTasks bool) + EnterChildren func(taskEntries []*TaskEntry) + EnterLeadingChildren func(enterCode int) + EvalActivity func() (done bool, err error) + EvalLink func(link *definition.Link) (bool, error) + Failed func(err error) + FromInstLinks func() []LinkInst + GetSetting func(setting string) (value interface{}, exists bool) + GetWorkingData func(key string) (*data.Attribute, bool) + HasActivity func() bool + SetState func(state int) + State func() int + Task func() *definition.Task + ToInstLinks func() []LinkInst + UpdateWorkingData func(key string, value interface{}) error + type TaskEntry struct + EnterCode int + Task *definition.Task + type TaskInst interface + State func() int + Task func() *definition.Task