Versions in this module Expand all Collapse all v0 v0.5.1 Feb 1, 2018 Changes in this version + const OpRestart + const OpResume + const OpStart + func ApplyExecOptions(instance *Instance, execOptions *ExecOptions) + func DefaultConfig() *util.ServiceConfig + func NewFixedTaskScope(refAttrs map[string]*data.Attribute, task *definition.Task, isInput bool) data.Scope + func NewWorkingDataScope(parentScope data.Scope, workingData map[string]*data.Attribute) data.Scope + type ActionCtx struct + func (ac *ActionCtx) GetResolver() data.Resolver + func (ac *ActionCtx) ID() string + func (ac *ActionCtx) InstanceMetadata() *action.ConfigMetadata + func (ac *ActionCtx) Ref() string + func (ac *ActionCtx) Reply(replyData map[string]*data.Attribute, err error) + func (ac *ActionCtx) Return(returnData map[string]*data.Attribute, err error) + func (ac *ActionCtx) WorkingData() data.Scope + type ActivityEvalError struct + func NewActivityEvalError(taskName string, errorType string, errorText string) *ActivityEvalError + func (e *ActivityEvalError) Error() string + func (e *ActivityEvalError) TaskName() string + func (e *ActivityEvalError) Type() string + type AttributeChange struct + Attribute *data.Attribute + ChgType ChgType + type ChgType int + const CtAdd + const CtDel + const CtUpd + type ExecOptions struct + Interceptor *support.Interceptor + Patch *support.Patch + type ExecType int + const EtEval + const EtPostEval + type FixedTaskScope struct + func (s *FixedTaskScope) GetAttr(attrName string) (attr *data.Attribute, exists bool) + func (s *FixedTaskScope) SetAttrValue(attrName string, value interface{}) error + type IDGenerator interface + NewFlowInstanceID func() string + type IDResponse struct + ID string + type Instance struct + Attrs map[string]*data.Attribute + ChangeTracker *InstanceChangeTracker + EhTaskEnv *TaskEnv + Flow *definition.Definition + FlowModel *model.FlowModel + FlowURI string + Interceptor *support.Interceptor + Patch *support.Patch + RootTaskEnv *TaskEnv + WorkItemQueue *util.SyncQueue + func New(instanceID string, flowURI string, flow *definition.Definition, ...) *Instance + func (pi *Instance) ActionContext() action.Context + func (pi *Instance) AddAttr(attrName string, attrType data.Type, value interface{}) *data.Attribute + func (pi *Instance) DoStep() bool + func (pi *Instance) FlowDefinition() *definition.Definition + func (pi *Instance) GetAttr(attrName string) (value *data.Attribute, exists bool) + func (pi *Instance) GetChanges() *InstanceChangeTracker + func (pi *Instance) GetReturnData() (map[string]*data.Attribute, error) + func (pi *Instance) HandleGlobalError() + func (pi *Instance) ID() string + func (pi *Instance) InitActionContext(config *action.Config, handler action.ResultHandler) + func (pi *Instance) MarshalJSON() ([]byte, error) + func (pi *Instance) Name() string + func (pi *Instance) ReplyHandler() activity.ReplyHandler + func (pi *Instance) ResetChanges() + func (pi *Instance) Restart(id string, provider provider.Provider) + func (pi *Instance) SetAttrValue(attrName string, value interface{}) error + func (pi *Instance) SetFlowProvider(provider provider.Provider) + func (pi *Instance) SetState(state int) + func (pi *Instance) Start(startAttrs []*data.Attribute) bool + func (pi *Instance) State() int + func (pi *Instance) Status() Status + func (pi *Instance) StepID() int + func (pi *Instance) UnmarshalJSON(d []byte) error + func (pi *Instance) UpdateAttrs(attrs []*data.Attribute) + type InstanceChange struct + AttrChanges []*AttributeChange + Changes int + State int + Status Status + type InstanceChangeTracker struct + func NewInstanceChangeTracker() *InstanceChangeTracker + func (ict *InstanceChangeTracker) AttrChange(chgType ChgType, attribute *data.Attribute) + func (ict *InstanceChangeTracker) MarshalJSON() ([]byte, error) + func (ict *InstanceChangeTracker) ResetChanges() + func (ict *InstanceChangeTracker) SetState(state int) + func (ict *InstanceChangeTracker) SetStatus(status Status) + type LinkData struct + func NewLinkData(taskEnv *TaskEnv, link *definition.Link) *LinkData + func (ld *LinkData) Link() *definition.Link + func (ld *LinkData) MarshalJSON() ([]byte, error) + func (ld *LinkData) SetState(state int) + func (ld *LinkData) State() int + func (ld *LinkData) UnmarshalJSON(d []byte) error + type LinkDataChange struct + ChgType ChgType + ID int + LinkData *LinkData + type RecordSnapshotReq struct + FlowID string + ID int + SnapshotData *Instance + State int + Status int + type RecordStepReq struct + FlowID string + ID int + State int + Status int + StepData *InstanceChangeTracker + type RemoteStateRecorder struct + func NewRemoteStateRecorder(config *util.ServiceConfig) *RemoteStateRecorder + func (sr *RemoteStateRecorder) Enabled() bool + func (sr *RemoteStateRecorder) Name() string + func (sr *RemoteStateRecorder) RecordSnapshot(instance *Instance) + func (sr *RemoteStateRecorder) RecordStep(instance *Instance) + func (sr *RemoteStateRecorder) Start() error + func (sr *RemoteStateRecorder) Stop() error + type RunOptions struct + ExecOptions *ExecOptions + FlowURI string + InitialState *Instance + Op int + ReturnID bool + type SimpleReplyHandler struct + func (rh *SimpleReplyHandler) Reply(code int, replyData interface{}, err error) + type StateRecorder interface + RecordSnapshot func(instance *Instance) + RecordStep func(instance *Instance) + type Status int + const StatusActive + const StatusCancelled + const StatusCompleted + const StatusFailed + const StatusNotStarted + type TaskData struct + func NewTaskData(taskEnv *TaskEnv, task *definition.Task) *TaskData + func (td *TaskData) ActionContext() action.Context + func (td *TaskData) AddWorkingData(attr *data.Attribute) + func (td *TaskData) ChildTaskInsts() (taskInsts []model.TaskInst, hasChildTasks bool) + func (td *TaskData) EnterChildren(taskEntries []*model.TaskEntry) + func (td *TaskData) EnterLeadingChildren(enterCode int) + func (td *TaskData) EvalActivity() (done bool, evalErr error) + func (td *TaskData) EvalLink(link *definition.Link) (result bool, err error) + func (td *TaskData) Failed(err error) + func (td *TaskData) FlowDetails() activity.FlowDetails + func (td *TaskData) FromInstLinks() []model.LinkInst + func (td *TaskData) GetInput(name string) interface{} + func (td *TaskData) GetOutput(name string) interface{} + func (td *TaskData) GetSetting(setting string) (value interface{}, exists bool) + func (td *TaskData) GetWorkingData(key string) (*data.Attribute, bool) + func (td *TaskData) HasActivity() bool + func (td *TaskData) HasAttrs() bool + func (td *TaskData) HasWorkingData() bool + func (td *TaskData) InputScope() data.Scope + func (td *TaskData) MarshalJSON() ([]byte, error) + func (td *TaskData) OutputScope() data.Scope + func (td *TaskData) SetOutput(name string, value interface{}) + func (td *TaskData) SetState(state int) + func (td *TaskData) State() int + func (td *TaskData) Task() *definition.Task + func (td *TaskData) TaskName() string + func (td *TaskData) ToInstLinks() []model.LinkInst + func (td *TaskData) UnmarshalJSON(d []byte) error + func (td *TaskData) UpdateWorkingData(key string, value interface{}) error + type TaskDataChange struct + ChgType ChgType + ID string + TaskData *TaskData + type TaskEnv struct + ID int + Instance *Instance + LinkDatas map[int]*LinkData + ParentEnv *TaskEnv + Task *definition.Task + TaskDatas map[string]*TaskData + func (te *TaskEnv) FindOrCreateLinkData(link *definition.Link) (linkData *LinkData, created bool) + func (te *TaskEnv) FindOrCreateTaskData(task *definition.Task) (taskData *TaskData, created bool) + func (te *TaskEnv) MarshalJSON() ([]byte, error) + func (te *TaskEnv) NewTaskData(task *definition.Task) *TaskData + func (te *TaskEnv) UnmarshalJSON(data []byte) error + type WorkItem struct + EvalCode int + ExecType ExecType + ID int + TaskData *TaskData + TaskID string + func NewWorkItem(id int, taskData *TaskData, execType ExecType, evalCode int) *WorkItem + type WorkItemQueueChange struct + ChgType ChgType + ID int + WorkItem *WorkItem + type WorkingDataScope struct + func (s *WorkingDataScope) GetAttr(attrName string) (attr *data.Attribute, exists bool) + func (s *WorkingDataScope) SetAttrValue(attrName string, value interface{}) error