Documentation ¶
Index ¶
- Constants
- func FirstWorkflow(context *endly.Context) *model.Process
- func GetResource(dao *Dao, state data.Map, URL string) *url.Resource
- func Last(context *endly.Context) *model.Process
- func LastWorkflow(context *endly.Context) *model.Process
- func New() endly.Service
- func Pop(context *endly.Context) *model.Process
- func Push(context *endly.Context, process *model.Process)
- type AsyncEvent
- type Dao
- type EndEvent
- type ExitRequest
- type ExitResponse
- type FailRequest
- type FailResponse
- type GotoRequest
- type GotoResponse
- type InitEvent
- type LoadRequest
- type LoadResponse
- type LoadedEvent
- type Logger
- type ModifiedStateEvent
- type NopParrotRequest
- type NopRequest
- type PrintRequest
- type RegisterRequest
- type RegisterResponse
- type RunRequest
- type RunResponse
- type Service
- type SwitchCase
- type SwitchRequest
- type SwitchResponse
Constants ¶
const (
//ServiceID represents workflow Service id
ServiceID = "workflow"
)
Variables ¶
This section is empty.
Functions ¶
func FirstWorkflow ¶
FirstWorkflow returns last workflow
func GetResource ¶
GetResource returns workflow resource
func LastWorkflow ¶
LastWorkflow returns last workflow
Types ¶
type AsyncEvent ¶
AsyncEvent represents an async action event.
func NewAsyncEvent ¶
func NewAsyncEvent(action *model.Action) *AsyncEvent
NewAsyncEvent creates a new AsyncEvent.
type EndEvent ¶
type EndEvent struct {
SessionID string
}
EndEvent represents Activity end event type.
type ExitRequest ¶
ExitRequest represents workflow exit request, to exit a caller workflow
type GotoRequest ¶
type GotoRequest struct {
Task string
}
GotoRequest represents goto task action, this request will terminate current task execution to switch to specified task
type LoadRequest ¶
LoadRequest represents workflow load request from the specified source
func (*LoadRequest) Validate ¶ added in v0.8.0
func (r *LoadRequest) Validate() error
Validate checks if request is valid
type LoadResponse ¶
LoadResponse represents loaded workflow
type LoadedEvent ¶
LoadedEvent represents workflow load event
func NewLoadedEvent ¶
func NewLoadedEvent(workflow *model.Workflow) *LoadedEvent
NewLoadedEvent create a new workflow load event.
type Logger ¶
type Logger struct { *model.Activities Listener msg.Listener // contains filtered or unexported fields }
Logger represent event logger to drop event details in the provied directory.
func (*Logger) AsEventListener ¶
AsEventListener returns an event Listener
type ModifiedStateEvent ¶
type ModifiedStateEvent struct { Variables model.Variables In map[string]interface{} Modified map[string]interface{} }
ModifiedStateEvent represent modified state event
func NewModifiedStateEvent ¶
func NewModifiedStateEvent(variables model.Variables, in, out data.Map) *ModifiedStateEvent
NewModifiedStateEvent creates a new modified state event.
type NopParrotRequest ¶
type NopParrotRequest struct {
In interface{}
}
NopParrotRequest represent parrot request
type PrintRequest ¶
PrintRequest represent print request
func (*PrintRequest) Messages ¶
func (r *PrintRequest) Messages() []*msg.Message
Messages returns messages
type RegisterRequest ¶
RegisterRequest represents workflow register request
type RegisterResponse ¶
RegisterResponse represents workflow register response
type RunRequest ¶
type RunRequest struct { EnableLogging bool `description:"flag to enable logging"` LogDirectory string `description:"log directory"` EventFilter map[string]bool `description:"optional CLI filter option,key is either package name or package name.request/event prefix "` Async bool `description:"flag to runWorkflow it asynchronously. Do not set it your self runner sets the flag for the first workflow"` Params map[string]interface{} `` /* 132-byte string literal not displayed */ PublishParameters bool `default:"true" description:"flag to publish parameters directly into context state"` URL string `description:"workflow URL if workflow is not found in the registry, it is loaded"` Name string `required:"true" description:"name defined in workflow document"` Source *url.Resource `description:"run request location "` AssetURL string TagIDs string `description:"coma separated TagID list, if present in a task, only matched runs, other task runWorkflow as normal"` Tasks string `required:"true" description:"coma separated task list, if empty or '*' runs all tasks sequentially"` //tasks to runWorkflow with coma separated list or '*', or empty string for all tasks *model.Pipelines // contains filtered or unexported fields }
RunRequest represents workflow runWorkflow request
func NewRunRequest ¶
func NewRunRequest(workflow string, params map[string]interface{}, publishParams bool) *RunRequest
NewRunRequest creates a new runWorkflow request
func NewRunRequestFromURL ¶
func NewRunRequestFromURL(URL string) (*RunRequest, error)
NewRunRequestFromURL creates a new request from URL
func (*RunRequest) Validate ¶
func (r *RunRequest) Validate() error
Validate checks if request is valid
type RunResponse ¶
type RunResponse struct { Data map[string]interface{} // data populated by .Post variable section. SessionID string //session id }
RunResponse represents workflow runWorkflow response
type Service ¶
type Service struct { *endly.AbstractService Dao *Dao // contains filtered or unexported fields }
Service represents a workflow service.
func (*Service) HasWorkflow ¶
HasWorkflow returns true if service has registered workflow.
type SwitchCase ¶
type SwitchCase struct { *model.ServiceRequest `description:"action to runWorkflow if matched"` Task string `description:"task to runWorkflow if matched"` Value interface{} `required:"true" description:"matching sourceKey value"` }
SwitchCase represent matching candidate case
type SwitchRequest ¶
type SwitchRequest struct { SourceKey string `required:"true" description:"sourceKey for matching value"` Cases []*SwitchCase `required:"true" description:"matching value cases"` Default *SwitchCase `description:"in case no value was match case"` }
SwitchRequest represent switch action request
func (*SwitchRequest) Match ¶
func (r *SwitchRequest) Match(source interface{}) *SwitchCase
Match matches source with supplied action request.
func (*SwitchRequest) Validate ¶
func (r *SwitchRequest) Validate() error
Validate checks if workflow is valid
type SwitchResponse ¶
type SwitchResponse interface{}
SwitchResponse represents actual action or task response