Documentation ¶
Index ¶
- type Action
- type Actiondatafilter
- type Branch
- type Callbackstate
- func (j Callbackstate) GetDataInputSchema() string
- func (j Callbackstate) GetDataOutputSchema() string
- func (j Callbackstate) GetId() string
- func (j Callbackstate) GetMetadata() Metadata_1
- func (j Callbackstate) GetName() string
- func (j Callbackstate) GetStart() Start
- func (j Callbackstate) GetStateDataFilter() Statedatafilter
- func (j Callbackstate) GetType() string
- type Common
- type CorrelationDef
- type Databasedswitch
- func (j Databasedswitch) GetDataInputSchema() string
- func (j Databasedswitch) GetDataOutputSchema() string
- func (j Databasedswitch) GetId() string
- func (j Databasedswitch) GetMetadata() Metadata_1
- func (j Databasedswitch) GetName() string
- func (j Databasedswitch) GetStart() Start
- func (j Databasedswitch) GetStateDataFilter() Statedatafilter
- func (j Databasedswitch) GetType() string
- func (j *Databasedswitch) UnmarshalJSON(data []byte) error
- type DatabasedswitchDataConditionsElem
- type Datacondition
- type Defaultdef
- type Delaystate
- func (j Delaystate) GetDataInputSchema() string
- func (j Delaystate) GetDataOutputSchema() string
- func (j Delaystate) GetId() string
- func (j Delaystate) GetMetadata() Metadata_1
- func (j Delaystate) GetName() string
- func (j Delaystate) GetStart() Start
- func (j Delaystate) GetStateDataFilter() Statedatafilter
- func (j Delaystate) GetType() string
- type End
- type EndKind
- type Enddatacondition
- type Enddeventcondition
- type Error
- type Errordatafilter
- type Eventbasedswitch
- func (j Eventbasedswitch) GetDataInputSchema() string
- func (j Eventbasedswitch) GetDataOutputSchema() string
- func (j Eventbasedswitch) GetId() string
- func (j Eventbasedswitch) GetMetadata() Metadata_1
- func (j Eventbasedswitch) GetName() string
- func (j Eventbasedswitch) GetStart() Start
- func (j Eventbasedswitch) GetStateDataFilter() Statedatafilter
- func (j Eventbasedswitch) GetType() string
- func (j *Eventbasedswitch) UnmarshalJSON(data []byte) error
- type EventbasedswitchEventConditionsElem
- type Eventcondition
- type Eventdatafilter
- type Eventdef
- type EventdefKind
- type Eventref
- type EventrefContextAttributes
- type Events
- type Eventstate
- func (j Eventstate) GetDataInputSchema() string
- func (j Eventstate) GetDataOutputSchema() string
- func (j Eventstate) GetId() string
- func (j Eventstate) GetMetadata() Metadata_1
- func (j Eventstate) GetName() string
- func (j Eventstate) GetStart() Start
- func (j Eventstate) GetStateDataFilter() Statedatafilter
- func (j Eventstate) GetType() string
- func (j *Eventstate) UnmarshalJSON(b []byte) error
- type Foreachstate
- func (j Foreachstate) GetDataInputSchema() string
- func (j Foreachstate) GetDataOutputSchema() string
- func (j Foreachstate) GetId() string
- func (j Foreachstate) GetMetadata() Metadata_1
- func (j Foreachstate) GetName() string
- func (j Foreachstate) GetStart() Start
- func (j Foreachstate) GetStateDataFilter() Statedatafilter
- func (j Foreachstate) GetType() string
- type Function
- type Functionref
- type FunctionrefParameters
- type Functions
- type Injectstate
- func (j Injectstate) GetDataInputSchema() string
- func (j Injectstate) GetDataOutputSchema() string
- func (j Injectstate) GetId() string
- func (j Injectstate) GetMetadata() Metadata_1
- func (j Injectstate) GetName() string
- func (j Injectstate) GetStart() Start
- func (j Injectstate) GetStateDataFilter() Statedatafilter
- func (j Injectstate) GetType() string
- type InjectstateData
- type Metadata
- type Metadata_1
- type Onevents
- type OneventsActionMode
- type Operationstate
- func (j Operationstate) GetDataInputSchema() string
- func (j Operationstate) GetDataOutputSchema() string
- func (j Operationstate) GetId() string
- func (j Operationstate) GetMetadata() Metadata_1
- func (j Operationstate) GetName() string
- func (j Operationstate) GetStart() Start
- func (j Operationstate) GetStateDataFilter() Statedatafilter
- func (j Operationstate) GetType() string
- func (j *Operationstate) UnmarshalJSON(b []byte) error
- type OperationstateActionMode
- type Parallelstate
- func (j Parallelstate) GetDataInputSchema() string
- func (j Parallelstate) GetDataOutputSchema() string
- func (j Parallelstate) GetId() string
- func (j Parallelstate) GetMetadata() Metadata_1
- func (j Parallelstate) GetName() string
- func (j Parallelstate) GetStart() Start
- func (j Parallelstate) GetStateDataFilter() Statedatafilter
- func (j Parallelstate) GetType() string
- func (j *Parallelstate) UnmarshalJSON(b []byte) error
- type ParallelstateCompletionType
- type Produceeventdef
- type ProduceeventdefContextAttributes
- type Schedule
- type ScheduleDirectInvoke
- type Start
- type StartKind
- type State
- type Statedatafilter
- type Subflowstate
- func (j Subflowstate) GetDataInputSchema() string
- func (j Subflowstate) GetDataOutputSchema() string
- func (j Subflowstate) GetId() string
- func (j Subflowstate) GetMetadata() Metadata_1
- func (j Subflowstate) GetName() string
- func (j Subflowstate) GetStart() Start
- func (j Subflowstate) GetStateDataFilter() Statedatafilter
- func (j Subflowstate) GetType() string
- func (j *Subflowstate) UnmarshalJSON(b []byte) error
- type Switchstate
- type Transition
- type Transitiondatacondition
- type Transitioneventcondition
- type Workflow
- type WorkflowCommon
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { // ActionDataFilter corresponds to the JSON schema field "actionDataFilter". ActionDataFilter *Actiondatafilter `json:"actionDataFilter,omitempty"` // References a 'trigger' and 'result' reusable event definitions EventRef *Eventref `json:"eventRef,omitempty"` // References a reusable function definition FunctionRef *Functionref `json:"functionRef,omitempty"` // Unique action definition name Name *string `json:"name,omitempty"` // Time period to wait for function execution to complete Timeout *string `json:"timeout,omitempty"` }
type Actiondatafilter ¶
type Actiondatafilter struct { // JsonPath definition that selects parts of the states data input to be the // action data DataInputPath *string `json:"dataInputPath,omitempty"` // JsonPath definition that selects parts of the actions data result, to be merged // with the states data DataResultsPath *string `json:"dataResultsPath,omitempty"` }
type Branch ¶
type Branch struct { // Actions to be executed in this branch Actions []Action `json:"actions,omitempty"` // Branch name Name *string `json:"name,omitempty"` // Unique Id of a workflow to be executed in this branch WorkflowId *string `json:"workflowId,omitempty"` }
Branch Definition
type Callbackstate ¶
type Callbackstate struct { // Defines the action to be executed Action *Action `json:"action,omitempty"` // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // State end definition End *End `json:"end,omitempty"` // Callback event data filter definition EventDataFilter *Eventdatafilter `json:"eventDataFilter,omitempty"` // References an unique callback event name in the defined workflow events EventRef *string `json:"eventRef,omitempty"` // Unique state id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // State data filter definition StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // Time period to wait for incoming events (ISO 8601 format) Timeout *string `json:"timeout,omitempty"` // Next transition of the workflow after all the actions have been performed Transition *Transition `json:"transition,omitempty"` // State type Type *string `json:"type,omitempty"` }
This state performs an action, then waits for the callback event that denotes completion of the action
func (Callbackstate) GetDataInputSchema ¶
func (j Callbackstate) GetDataInputSchema() string
GetDataInputSchema ...
func (Callbackstate) GetDataOutputSchema ¶
func (j Callbackstate) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Callbackstate) GetStateDataFilter ¶
func (j Callbackstate) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
type CorrelationDef ¶
type CorrelationDef struct { // CloudEvent Extension Context Attribute name ContextAttributeName string `json:"contextAttributeName"` // CloudEvent Extension Context Attribute value ContextAttributeValue *string `json:"contextAttributeValue,omitempty"` }
CloudEvent correlation definition
func (*CorrelationDef) UnmarshalJSON ¶
func (j *CorrelationDef) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Databasedswitch ¶
type Databasedswitch struct { // Defines conditions evaluated against state data DataConditions []DatabasedswitchDataConditionsElem `json:"dataConditions,omitempty"` // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // Default transition of the workflow if there is no matching data conditions. Can // include a transition or end definition Default *Defaultdef `json:"default,omitempty"` // Unique State id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // State type Type *string `json:"type,omitempty"` }
Permits transitions to other states based on data conditions
func (Databasedswitch) GetDataInputSchema ¶
func (j Databasedswitch) GetDataInputSchema() string
GetDataInputSchema ...
func (Databasedswitch) GetDataOutputSchema ¶
func (j Databasedswitch) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Databasedswitch) GetMetadata ¶
func (j Databasedswitch) GetMetadata() Metadata_1
GetMetadata ...
func (Databasedswitch) GetStateDataFilter ¶
func (j Databasedswitch) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
func (*Databasedswitch) UnmarshalJSON ¶
func (j *Databasedswitch) UnmarshalJSON(data []byte) error
UnmarshalJSON implementation for json Unmarshal function for the Databasedswitch type
type DatabasedswitchDataConditionsElem ¶
type DatabasedswitchDataConditionsElem interface{}
type Datacondition ¶
type Datacondition interface{}
type Defaultdef ¶
type Defaultdef struct { // End corresponds to the JSON schema field "end". End *End `json:"end,omitempty"` // Transition corresponds to the JSON schema field "transition". Transition *Transition `json:"transition,omitempty"` }
Default definition. Can be either a transition or end definition
type Delaystate ¶
type Delaystate struct { // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // State end definition End *End `json:"end,omitempty"` // Unique State id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // Amount of time (ISO 8601 format) to delay TimeDelay *string `json:"timeDelay,omitempty"` // Next transition of the workflow after the time delay Transition *Transition `json:"transition,omitempty"` // State type Type *string `json:"type,omitempty"` }
Causes the workflow execution to delay for a specified duration
func (Delaystate) GetDataInputSchema ¶
func (j Delaystate) GetDataInputSchema() string
GetDataInputSchema ...
func (Delaystate) GetDataOutputSchema ¶
func (j Delaystate) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Delaystate) GetStateDataFilter ¶
func (j Delaystate) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
type End ¶
type End struct { // Kind of end definition Kind *EndKind `json:"kind,omitempty"` // Used if kind is event. Array of events to be produced ProduceEvents []Produceeventdef `json:"produceEvents,omitempty"` }
State end definition
type EndKind ¶
type EndKind string
const EndKindDefault EndKind = "default"
const EndKindEvent EndKind = "event"
const EndKindTerminate EndKind = "terminate"
func (*EndKind) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type Enddatacondition ¶
type Enddatacondition struct { // JsonPath expression evaluated against state data. True if results are not empty Condition string `json:"condition"` // Explicit transition to end End End `json:"end"` // Data condition name Name *string `json:"name,omitempty"` }
Switch state data based condition
func (*Enddatacondition) UnmarshalJSON ¶
func (j *Enddatacondition) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Enddeventcondition ¶
type Enddeventcondition struct { // Explicit transition to end End *End `json:"end,omitempty"` // References an unique event name in the defined workflow events EventRef string `json:"eventRef"` // Event condition name Name *string `json:"name,omitempty"` }
Switch state data event condition
func (*Enddeventcondition) UnmarshalJSON ¶
func (j *Enddeventcondition) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Error ¶
type Error struct { // Error code. Can be used in addition to the name to help runtimes resolve to // technical errors/exceptions. Should not be defined if error is set to '*' Code *string `json:"code,omitempty"` // End workflow execution in case of this error. If retryRef is defined, this ends // workflow only if retries were unsuccessful. End *End `json:"end,omitempty"` // Domain-specific error name, or '*' to indicate all possible errors Error *string `json:"error,omitempty"` // References a unique name of a retry definition. RetryRef *string `json:"retryRef,omitempty"` // Transition to next state to handle the error. If retryRef is defined, this // transition is taken only if retries were unsuccessful. Transition *Transition `json:"transition,omitempty"` }
type Errordatafilter ¶
type Errordatafilter struct { // JsonPath definition that selects parts of the error data, to be merged with the // states data DataOutputPath *string `json:"dataOutputPath,omitempty"` }
type Eventbasedswitch ¶
type Eventbasedswitch struct { // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // Default transition of the workflow if there is no matching data conditions. Can // include a transition or end definition Default *Defaultdef `json:"default,omitempty"` // Defines conditions evaluated against events EventConditions []EventbasedswitchEventConditionsElem `json:"eventConditions,omitempty"` // If eventConditions is used, defines the time period to wait for events (ISO // 8601 format) EventTimeout *string `json:"eventTimeout,omitempty"` // Unique State id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // State type Type *string `json:"type,omitempty"` }
Permits transitions to other states based on events
func (Eventbasedswitch) GetDataInputSchema ¶
func (j Eventbasedswitch) GetDataInputSchema() string
GetDataInputSchema ...
func (Eventbasedswitch) GetDataOutputSchema ¶
func (j Eventbasedswitch) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Eventbasedswitch) GetMetadata ¶
func (j Eventbasedswitch) GetMetadata() Metadata_1
GetMetadata ...
func (Eventbasedswitch) GetStateDataFilter ¶
func (j Eventbasedswitch) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
func (*Eventbasedswitch) UnmarshalJSON ¶
func (j *Eventbasedswitch) UnmarshalJSON(data []byte) error
UnmarshalJSON implementation for json Unmarshal function for the Eventbasedswitch type
type EventbasedswitchEventConditionsElem ¶
type EventbasedswitchEventConditionsElem interface{}
type Eventcondition ¶
type Eventcondition interface{}
type Eventdatafilter ¶
type Eventdatafilter struct { // JsonPath definition that selects parts of the event data, to be merged with the // states data DataOutputPath *string `json:"dataOutputPath,omitempty"` }
type Eventdef ¶
type Eventdef struct { // CloudEvent correlation definitions Correlation []CorrelationDef `json:"correlation,omitempty"` // Defines the CloudEvent as either 'consumed' or 'produced' by the workflow. // Default is 'consumed' Kind EventdefKind `json:"kind,omitempty"` // Metadata information Metadata Metadata_1 `json:"metadata,omitempty"` // Unique event name Name *string `json:"name,omitempty"` // List of unique event names that share the rest of the properties (source, type, // kind, default) Names []string `json:"names,omitempty"` // CloudEvent source Source *string `json:"source,omitempty"` // CloudEvent type Type *string `json:"type,omitempty"` }
func (*Eventdef) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type EventdefKind ¶
type EventdefKind string
const EventdefKindConsumed EventdefKind = "consumed"
const EventdefKindProduced EventdefKind = "produced"
func (*EventdefKind) UnmarshalJSON ¶
func (j *EventdefKind) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Eventref ¶
type Eventref struct { // Add additional extension context attributes to the produced event ContextAttributes EventrefContextAttributes `json:"contextAttributes,omitempty"` // If string type, an expression which selects parts of the states data output to // become the data (payload) of the event referenced by 'triggerEventRef'. If // object type, a custom object to become the data (payload) of the event // referenced by 'triggerEventRef'. Data interface{} `json:"data,omitempty"` // Reference to the unique name of a 'consumed' event definition ResultEventRef string `json:"resultEventRef"` // Reference to the unique name of a 'produced' event definition TriggerEventRef string `json:"triggerEventRef"` }
Event References
func (*Eventref) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type EventrefContextAttributes ¶
type EventrefContextAttributes map[string]interface{}
Add additional extension context attributes to the produced event
type Eventstate ¶
type Eventstate struct { // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // State end definition End *End `json:"end,omitempty"` // If true consuming one of the defined events causes its associated actions to be // performed. If false all of the defined events must be consumed in order for // actions to be performed Exclusive bool `json:"exclusive,omitempty"` // Unique State id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // Define what events trigger one or more actions to be performed OnEvents []Onevents `json:"onEvents,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // Time period to wait for incoming events (ISO 8601 format) Timeout *string `json:"timeout,omitempty"` // Next transition of the workflow after all the actions have been performed Transition *Transition `json:"transition,omitempty"` // State type Type *string `json:"type,omitempty"` }
This state is used to wait for events from event sources, then consumes them and invoke one or more actions to run in sequence or parallel
func (Eventstate) GetDataInputSchema ¶
func (j Eventstate) GetDataInputSchema() string
GetDataInputSchema ...
func (Eventstate) GetDataOutputSchema ¶
func (j Eventstate) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Eventstate) GetStateDataFilter ¶
func (j Eventstate) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
func (*Eventstate) UnmarshalJSON ¶
func (j *Eventstate) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Foreachstate ¶
type Foreachstate struct { // Actions to be executed for each of the elements of inputCollection Actions []Action `json:"actions,omitempty"` // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // State end definition End *End `json:"end,omitempty"` // Unique State id Id *string `json:"id,omitempty"` // JsonPath expression selecting an array element of the states data InputCollection *string `json:"inputCollection,omitempty"` // Name of the iteration parameter that can be referenced in actions/workflow. For // each parallel iteration, this param should contain an unique element of the // inputCollection array IterationParam *string `json:"iterationParam,omitempty"` // Specifies how upper bound on how many iterations may run in parallel Max interface{} `json:"max,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // JsonPath expression specifying an array element of the states data to add the // results of each iteration OutputCollection *string `json:"outputCollection,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // Next transition of the workflow after state has completed Transition *Transition `json:"transition,omitempty"` // State type Type *string `json:"type,omitempty"` // Unique Id of a workflow to be executed for each of the elements of // inputCollection WorkflowId *string `json:"workflowId,omitempty"` }
Execute a set of defined actions or workflows for each element of a data array
func (Foreachstate) GetDataInputSchema ¶
func (j Foreachstate) GetDataInputSchema() string
GetDataInputSchema ...
func (Foreachstate) GetDataOutputSchema ¶
func (j Foreachstate) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Foreachstate) GetStateDataFilter ¶
func (j Foreachstate) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
type Function ¶
type Function struct { // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // Unique function name Name string `json:"name"` // Combination of the function/service OpenAPI definition URI and the operationID // of the operation that needs to be invoked, separated by a '#'. For example // 'https://petstore.swagger.io/v2/swagger.json#getPetById' Operation *string `json:"operation,omitempty"` }
func (*Function) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type Functionref ¶
type Functionref struct { // Function parameters Parameters FunctionrefParameters `json:"parameters,omitempty"` // Name of the referenced function RefName string `json:"refName"` }
Function Reference
func (*Functionref) UnmarshalJSON ¶
func (j *Functionref) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Functions ¶
type Functions map[string]interface{}
Serverless Workflow specification - functions schema
type Injectstate ¶
type Injectstate struct { // JSON object which can be set as states data input and can be manipulated via // filters Data InjectstateData `json:"data,omitempty"` // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // State end definition End *End `json:"end,omitempty"` // Unique state id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // Next transition of the workflow after subflow has completed Transition *Transition `json:"transition,omitempty"` // State type Type *string `json:"type,omitempty"` }
Inject static data into state data. Does not perform any actions
func (Injectstate) GetDataInputSchema ¶
func (j Injectstate) GetDataInputSchema() string
GetDataInputSchema ...
func (Injectstate) GetDataOutputSchema ¶
func (j Injectstate) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Injectstate) GetStateDataFilter ¶
func (j Injectstate) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
type InjectstateData ¶
type InjectstateData map[string]interface{}
JSON object which can be set as states data input and can be manipulated via filters
type Onevents ¶
type Onevents struct { // Specifies how actions are to be performed (in sequence of parallel) ActionMode OneventsActionMode `json:"actionMode,omitempty"` // Actions to be performed if expression matches Actions []Action `json:"actions"` // EventDataFilter corresponds to the JSON schema field "eventDataFilter". EventDataFilter *Eventdatafilter `json:"eventDataFilter,omitempty"` // References one or more unique event names in the defined workflow events EventRefs []string `json:"eventRefs"` }
func (*Onevents) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type OneventsActionMode ¶
type OneventsActionMode string
const OneventsActionModeParallel OneventsActionMode = "parallel"
const OneventsActionModeSequential OneventsActionMode = "sequential"
func (*OneventsActionMode) UnmarshalJSON ¶
func (j *OneventsActionMode) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Operationstate ¶
type Operationstate struct { // Specifies whether actions are performed in sequence or in parallel ActionMode OperationstateActionMode `json:"actionMode,omitempty"` // Actions to be performed Actions []Action `json:"actions,omitempty"` // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // State end definition End *End `json:"end,omitempty"` // Unique State id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // Next transition of the workflow after all the actions have been performed Transition *Transition `json:"transition,omitempty"` // State type Type *string `json:"type,omitempty"` }
Defines actions be performed. Does not wait for incoming events
func (Operationstate) GetDataInputSchema ¶
func (j Operationstate) GetDataInputSchema() string
GetDataInputSchema ...
func (Operationstate) GetDataOutputSchema ¶
func (j Operationstate) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Operationstate) GetMetadata ¶
func (j Operationstate) GetMetadata() Metadata_1
GetMetadata ...
func (Operationstate) GetStateDataFilter ¶
func (j Operationstate) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
func (*Operationstate) UnmarshalJSON ¶
func (j *Operationstate) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type OperationstateActionMode ¶
type OperationstateActionMode string
const OperationstateActionModeParallel OperationstateActionMode = "parallel"
const OperationstateActionModeSequential OperationstateActionMode = "sequential"
func (*OperationstateActionMode) UnmarshalJSON ¶
func (j *OperationstateActionMode) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Parallelstate ¶
type Parallelstate struct { // Branch Definitions Branches []Branch `json:"branches,omitempty"` // Option types on how to complete branch execution. CompletionType ParallelstateCompletionType `json:"completionType,omitempty"` // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // State end definition End *End `json:"end,omitempty"` // Unique State id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // Used when completionType is set to 'n_of_m' to specify the 'N' value N interface{} `json:"n,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // Next transition of the workflow after all branches have completed execution Transition *Transition `json:"transition,omitempty"` // State type Type *string `json:"type,omitempty"` }
Consists of a number of states that are executed in parallel
func (Parallelstate) GetDataInputSchema ¶
func (j Parallelstate) GetDataInputSchema() string
GetDataInputSchema ...
func (Parallelstate) GetDataOutputSchema ¶
func (j Parallelstate) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Parallelstate) GetStateDataFilter ¶
func (j Parallelstate) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
func (*Parallelstate) UnmarshalJSON ¶
func (j *Parallelstate) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ParallelstateCompletionType ¶
type ParallelstateCompletionType string
const ParallelstateCompletionTypeAnd ParallelstateCompletionType = "and"
const ParallelstateCompletionTypeNOfM ParallelstateCompletionType = "n_of_m"
const ParallelstateCompletionTypeXor ParallelstateCompletionType = "xor"
func (*ParallelstateCompletionType) UnmarshalJSON ¶
func (j *ParallelstateCompletionType) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Produceeventdef ¶
type Produceeventdef struct { // Add additional event extension context attributes ContextAttributes ProduceeventdefContextAttributes `json:"contextAttributes,omitempty"` // If String, expression which selects parts of the states data output to become // the data of the produced event. If object a custom object to become the data of // produced event. Data interface{} `json:"data,omitempty"` // References a name of a defined event EventRef string `json:"eventRef"` }
Produce an event and set its data
func (*Produceeventdef) UnmarshalJSON ¶
func (j *Produceeventdef) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ProduceeventdefContextAttributes ¶
type ProduceeventdefContextAttributes map[string]interface{}
Add additional event extension context attributes
type Schedule ¶
type Schedule struct { // Repeating interval (cron expression) describing when the workflow starting // state should be triggered Cron *string `json:"cron,omitempty"` // Define if workflow instances can be created outside of the defined // interval/cron DirectInvoke *ScheduleDirectInvoke `json:"directInvoke,omitempty"` // Time interval (ISO 8601 format) describing when the workflow starting state is // active Interval *string `json:"interval,omitempty"` // Timezone name used to evaluate the cron expression. Not used for interval as // timezone can be specified there directly. If not specified, should default to // local machine timezone. Timezone *string `json:"timezone,omitempty"` }
Start state schedule definition
type ScheduleDirectInvoke ¶
type ScheduleDirectInvoke string
const ScheduleDirectInvokeAllow ScheduleDirectInvoke = "allow"
const ScheduleDirectInvokeDeny ScheduleDirectInvoke = "deny"
func (*ScheduleDirectInvoke) UnmarshalJSON ¶
func (j *ScheduleDirectInvoke) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Start ¶
type Start struct { // Kind of start definition Kind *StartKind `json:"kind,omitempty"` // If kind is 'scheduled', define when the time/repeating intervals at which // workflow instances can/should be started Schedule *Schedule `json:"schedule,omitempty"` }
State start definition
type StartKind ¶
type StartKind string
const StartKindDefault StartKind = "default"
const StartKindScheduled StartKind = "scheduled"
func (*StartKind) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type State ¶
type State interface { GetId() string GetName() string GetType() string GetStart() Start GetStateDataFilter() Statedatafilter GetDataInputSchema() string GetDataOutputSchema() string GetMetadata() Metadata_1 }
State definition for a Workflow state
type Statedatafilter ¶
type Subflowstate ¶
type Subflowstate struct { // URI to JSON Schema that state data input adheres to DataInputSchema *string `json:"dataInputSchema,omitempty"` // URI to JSON Schema that state data output adheres to DataOutputSchema *string `json:"dataOutputSchema,omitempty"` // State end definition End *End `json:"end,omitempty"` // Unique state id Id *string `json:"id,omitempty"` // Metadata corresponds to the JSON schema field "metadata". Metadata Metadata_1 `json:"metadata,omitempty"` // State name Name *string `json:"name,omitempty"` // States error handling and retries definitions OnErrors []Error `json:"onErrors,omitempty"` // State start definition Start *Start `json:"start,omitempty"` // StateDataFilter corresponds to the JSON schema field "stateDataFilter". StateDataFilter *Statedatafilter `json:"stateDataFilter,omitempty"` // Next transition of the workflow after SubFlow has completed execution Transition *Transition `json:"transition,omitempty"` // State type Type *string `json:"type,omitempty"` // Workflow execution must wait for sub-workflow to finish before continuing WaitForCompletion bool `json:"waitForCompletion,omitempty"` // Sub-workflow unique id WorkflowId *string `json:"workflowId,omitempty"` }
Defines a sub-workflow to be executed
func (Subflowstate) GetDataInputSchema ¶
func (j Subflowstate) GetDataInputSchema() string
GetDataInputSchema ...
func (Subflowstate) GetDataOutputSchema ¶
func (j Subflowstate) GetDataOutputSchema() string
GetDataOutputSchema ...
func (Subflowstate) GetStateDataFilter ¶
func (j Subflowstate) GetStateDataFilter() Statedatafilter
GetStateDataFilter ...
func (*Subflowstate) UnmarshalJSON ¶
func (j *Subflowstate) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Switchstate ¶
type Switchstate interface{}
type Transition ¶
type Transition struct { // JsonPath expression. Evaluates to true if returns non-empty result Expression *string `json:"expression,omitempty"` // Name of state to transition to NextState string `json:"nextState"` // Array of events to be produced ProduceEvents []Produceeventdef `json:"produceEvents,omitempty"` }
func (*Transition) UnmarshalJSON ¶
func (j *Transition) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Transitiondatacondition ¶
type Transitiondatacondition struct { // JsonPath expression evaluated against state data. True if results are not empty Condition string `json:"condition"` // Data condition name Name *string `json:"name,omitempty"` // Next transition of the workflow if there is valid matches Transition Transition `json:"transition"` }
Switch state data based condition
func (*Transitiondatacondition) UnmarshalJSON ¶
func (j *Transitiondatacondition) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Transitioneventcondition ¶
type Transitioneventcondition struct { // References an unique event name in the defined workflow events EventRef string `json:"eventRef"` // Event condition name Name *string `json:"name,omitempty"` // Next transition of the workflow if there is valid matches Transition Transition `json:"transition"` }
Switch state data event condition
func (*Transitioneventcondition) UnmarshalJSON ¶
func (j *Transitioneventcondition) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type Workflow ¶
type Workflow struct { WorkflowCommon States []State `json:"states"` }
Workflow base definition
func (*Workflow) UnmarshalJSON ¶
UnmarshalJSON implementation for json Unmarshal function for the Workflow type
type WorkflowCommon ¶
type WorkflowCommon struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` Version string `json:"version"` SchemaVersion string `json:"schemaVersion"` DataInputSchema string `json:"dataInputSchema,omitempty"` DataOutputSchema string `json:"dataOutputSchema,omitempty"` Metadata Metadata `json:"metadata,omitempty"` Events []Eventdef `json:"events,omitempty"` Functions []Function `json:"functions,omitempty"` }
WorkflowCommon describes the partial Workflow definition that does not rely on generic interfaces to make it easy for custom unmarshalers implementations to unmarshal the common data structure.