model

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

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) GetId

func (j Callbackstate) GetId() string

GetId ...

func (Callbackstate) GetMetadata

func (j Callbackstate) GetMetadata() Metadata_1

GetMetadata ...

func (Callbackstate) GetName

func (j Callbackstate) GetName() string

GetName ...

func (Callbackstate) GetStart

func (j Callbackstate) GetStart() Start

GetType ...

func (Callbackstate) GetStateDataFilter

func (j Callbackstate) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Callbackstate) GetType

func (j Callbackstate) GetType() string

GetType ...

type Common

type Common map[string]interface{}

Serverless Workflow specification - common schema

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) GetId

func (j Databasedswitch) GetId() string

GetId ...

func (Databasedswitch) GetMetadata

func (j Databasedswitch) GetMetadata() Metadata_1

GetMetadata ...

func (Databasedswitch) GetName

func (j Databasedswitch) GetName() string

GetName ...

func (Databasedswitch) GetStart

func (j Databasedswitch) GetStart() Start

GetType ...

func (Databasedswitch) GetStateDataFilter

func (j Databasedswitch) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Databasedswitch) GetType

func (j Databasedswitch) GetType() string

GetType ...

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) GetId

func (j Delaystate) GetId() string

GetId ...

func (Delaystate) GetMetadata

func (j Delaystate) GetMetadata() Metadata_1

GetMetadata ...

func (Delaystate) GetName

func (j Delaystate) GetName() string

GetName ...

func (Delaystate) GetStart

func (j Delaystate) GetStart() Start

GetType ...

func (Delaystate) GetStateDataFilter

func (j Delaystate) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Delaystate) GetType

func (j Delaystate) GetType() string

GetType ...

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

func (j *EndKind) UnmarshalJSON(b []byte) error

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) GetId

func (j Eventbasedswitch) GetId() string

GetId ...

func (Eventbasedswitch) GetMetadata

func (j Eventbasedswitch) GetMetadata() Metadata_1

GetMetadata ...

func (Eventbasedswitch) GetName

func (j Eventbasedswitch) GetName() string

GetName ...

func (Eventbasedswitch) GetStart

func (j Eventbasedswitch) GetStart() Start

GetType ...

func (Eventbasedswitch) GetStateDataFilter

func (j Eventbasedswitch) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Eventbasedswitch) GetType

func (j Eventbasedswitch) GetType() string

GetType ...

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

func (j *Eventdef) UnmarshalJSON(b []byte) error

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

func (j *Eventref) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

type EventrefContextAttributes

type EventrefContextAttributes map[string]interface{}

Add additional extension context attributes to the produced event

type Events

type Events map[string]interface{}

Serverless Workflow specification - events schema

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) GetId

func (j Eventstate) GetId() string

GetId ...

func (Eventstate) GetMetadata

func (j Eventstate) GetMetadata() Metadata_1

GetMetadata ...

func (Eventstate) GetName

func (j Eventstate) GetName() string

GetName ...

func (Eventstate) GetStart

func (j Eventstate) GetStart() Start

GetType ...

func (Eventstate) GetStateDataFilter

func (j Eventstate) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Eventstate) GetType

func (j Eventstate) GetType() string

GetType ...

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) GetId

func (j Foreachstate) GetId() string

GetId ...

func (Foreachstate) GetMetadata

func (j Foreachstate) GetMetadata() Metadata_1

GetMetadata ...

func (Foreachstate) GetName

func (j Foreachstate) GetName() string

GetName ...

func (Foreachstate) GetStart

func (j Foreachstate) GetStart() Start

GetType ...

func (Foreachstate) GetStateDataFilter

func (j Foreachstate) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Foreachstate) GetType

func (j Foreachstate) GetType() string

GetType ...

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

func (j *Function) UnmarshalJSON(b []byte) error

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 FunctionrefParameters

type FunctionrefParameters map[string]interface{}

Function parameters

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) GetId

func (j Injectstate) GetId() string

GetId ...

func (Injectstate) GetMetadata

func (j Injectstate) GetMetadata() Metadata_1

GetMetadata ...

func (Injectstate) GetName

func (j Injectstate) GetName() string

GetName ...

func (Injectstate) GetStart

func (j Injectstate) GetStart() Start

GetType ...

func (Injectstate) GetStateDataFilter

func (j Injectstate) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Injectstate) GetType

func (j Injectstate) GetType() string

GetType ...

type InjectstateData

type InjectstateData map[string]interface{}

JSON object which can be set as states data input and can be manipulated via filters

type Metadata

type Metadata map[string]interface{}

Metadata information

type Metadata_1

type Metadata_1 map[string]interface{}

Metadata information

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

func (j *Onevents) UnmarshalJSON(b []byte) error

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) GetId

func (j Operationstate) GetId() string

GetId ...

func (Operationstate) GetMetadata

func (j Operationstate) GetMetadata() Metadata_1

GetMetadata ...

func (Operationstate) GetName

func (j Operationstate) GetName() string

GetName ...

func (Operationstate) GetStart

func (j Operationstate) GetStart() Start

GetType ...

func (Operationstate) GetStateDataFilter

func (j Operationstate) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Operationstate) GetType

func (j Operationstate) GetType() string

GetType ...

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) GetId

func (j Parallelstate) GetId() string

GetId ...

func (Parallelstate) GetMetadata

func (j Parallelstate) GetMetadata() Metadata_1

GetMetadata ...

func (Parallelstate) GetName

func (j Parallelstate) GetName() string

GetName ...

func (Parallelstate) GetStart

func (j Parallelstate) GetStart() Start

GetType ...

func (Parallelstate) GetStateDataFilter

func (j Parallelstate) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Parallelstate) GetType

func (j Parallelstate) GetType() string

GetType ...

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

func (j *StartKind) UnmarshalJSON(b []byte) error

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 Statedatafilter struct {
	// JsonPath definition that selects parts of the states data input
	DataInputPath *string `json:"dataInputPath,omitempty"`

	// JsonPath definition that selects parts of the states data output
	DataOutputPath *string `json:"dataOutputPath,omitempty"`
}

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) GetId

func (j Subflowstate) GetId() string

GetId ...

func (Subflowstate) GetMetadata

func (j Subflowstate) GetMetadata() Metadata_1

GetMetadata ...

func (Subflowstate) GetName

func (j Subflowstate) GetName() string

GetName ...

func (Subflowstate) GetStart

func (j Subflowstate) GetStart() Start

GetType ...

func (Subflowstate) GetStateDataFilter

func (j Subflowstate) GetStateDataFilter() Statedatafilter

GetStateDataFilter ...

func (Subflowstate) GetType

func (j Subflowstate) GetType() string

GetType ...

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

func (w *Workflow) UnmarshalJSON(data []byte) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL