Help us shape the future of Go! Take the 2026 Go Developer Survey

workflow

package
v0.69.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const NAME = "Workflow"

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	FullName string `xml:"fullName"`
	CcEmails []struct {
		Text string `xml:",chardata"`
	} `xml:"ccEmails"`
	Description   *TextLiteral `xml:"description"`
	Protected     *BooleanText `xml:"protected"`
	Recipients    []Recipient  `xml:"recipients"`
	SenderAddress *TextLiteral `xml:"senderAddress"`
	SenderType    *TextLiteral `xml:"senderType"`
	Template      *TextLiteral `xml:"template"`
}

type AlertFilter

type AlertFilter func(Alert) bool

type FieldUpdate

type FieldUpdate struct {
	FullName           TextLiteral  `xml:"fullName"`
	Description        *TextLiteral `xml:"description"`
	Field              TextLiteral  `xml:"field"`
	Formula            *TextLiteral `xml:"formula"`
	LiteralValue       *TextLiteral `xml:"literalValue"`
	LookupValue        *TextLiteral `xml:"lookupValue"`
	LookupValueType    *TextLiteral `xml:"lookupValueType"`
	Name               TextLiteral  `xml:"name"`
	NotifyAssignee     *BooleanText `xml:"notifyAssignee"`
	Operation          *TextLiteral `xml:"operation"`
	Protected          *BooleanText `xml:"protected"`
	ReevaluateOnChange *BooleanText `xml:"reevaluateOnChange"`
	TargetObject       *TextLiteral `xml:"targetObject"`
}

type OutboundMessage added in v0.69.0

type OutboundMessage struct {
	FullName           TextLiteral   `xml:"fullName"`
	ApiVersion         TextLiteral   `xml:"apiVersion"`
	Description        *TextLiteral  `xml:"description"`
	EndpointUrl        TextLiteral   `xml:"endpointUrl"`
	Fields             []TextLiteral `xml:"fields"`
	IncludeSessionId   TextLiteral   `xml:"includeSessionId"`
	IntegrationUser    TextLiteral   `xml:"integrationUser"`
	Name               TextLiteral   `xml:"name"`
	Protected          TextLiteral   `xml:"protected"`
	UseDeadLetterQueue *TextLiteral  `xml:"useDeadLetterQueue"`
}

type Recipient

type Recipient struct {
	Field     *TextLiteral `xml:"field"`
	Recipient *TextLiteral `xml:"recipient"`
	Type      struct {
		Text string `xml:",chardata"`
	} `xml:"type"`
}

type Rule

type Rule struct {
	FullName string `xml:"fullName"`
	Actions  []struct {
		Name struct {
			Text string `xml:",chardata"`
		} `xml:"name"`
		Type struct {
			Text string `xml:",chardata"`
		} `xml:"type"`
	} `xml:"actions"`
	Active        BooleanText  `xml:"active"`
	BooleanFilter *TextLiteral `xml:"booleanFilter"`
	CriteriaItems []struct {
		Field struct {
			Text string `xml:",chardata"`
		} `xml:"field"`
		Operation struct {
			Text string `xml:",chardata"`
		} `xml:"operation"`
		Value *TextLiteral `xml:"value"`
	} `xml:"criteriaItems"`
	Description                *TextLiteral `xml:"description"`
	FailedMigrationToolVersion *TextLiteral `xml:"failedMigrationToolVersion"`
	Formula                    *TextLiteral `xml:"formula"`
	TriggerType                *TextLiteral `xml:"triggerType"`
	WorkflowTimeTriggers       []struct {
		Actions []struct {
			Name struct {
				Text string `xml:",chardata"`
			} `xml:"name"`
			Type struct {
				Text string `xml:",chardata"`
			} `xml:"type"`
		} `xml:"actions"`
		OffsetFromField         *TextLiteral `xml:"offsetFromField"`
		TimeLength              *TextLiteral `xml:"timeLength"`
		WorkflowTimeTriggerUnit TextLiteral  `xml:"workflowTimeTriggerUnit"`
	} `xml:"workflowTimeTriggers"`
}

type RuleFilter

type RuleFilter func(Rule) bool

type Task

type Task struct {
	FullName        TextLiteral  `xml:"fullName"`
	AssignedTo      *TextLiteral `xml:"assignedTo"`
	AssignedToType  TextLiteral  `xml:"assignedToType"`
	Description     *TextLiteral `xml:"description"`
	DueDateOffset   TextLiteral  `xml:"dueDateOffset"`
	NotifyAssignee  TextLiteral  `xml:"notifyAssignee"`
	OffsetFromField *TextLiteral `xml:"offsetFromField"`
	Priority        TextLiteral  `xml:"priority"`
	Protected       TextLiteral  `xml:"protected"`
	Status          TextLiteral  `xml:"status"`
	Subject         TextLiteral  `xml:"subject"`
}

type Workflow

type Workflow struct {
	metadata.MetadataInfo
	XMLName          xml.Name          `xml:"Workflow"`
	Xmlns            string            `xml:"xmlns,attr"`
	Alerts           []Alert           `xml:"alerts"`
	FieldUpdates     []FieldUpdate     `xml:"fieldUpdates"`
	OutboundMessages []OutboundMessage `xml:"outboundMessages"`
	Rules            []Rule            `xml:"rules"`
	Tasks            []Task            `xml:"tasks"`
}

func Open

func Open(path string) (*Workflow, error)

func (*Workflow) DeleteAlert

func (o *Workflow) DeleteAlert(alertName string) error

func (*Workflow) DeleteRule

func (o *Workflow) DeleteRule(ruleName string) error

func (*Workflow) GetAlerts

func (w *Workflow) GetAlerts(filters ...AlertFilter) []Alert

func (*Workflow) GetFieldUpdates

func (w *Workflow) GetFieldUpdates() []FieldUpdate

func (*Workflow) GetRules

func (w *Workflow) GetRules(filters ...RuleFilter) []Rule

func (*Workflow) SetMetadata

func (c *Workflow) SetMetadata(m metadata.MetadataInfo)

func (Workflow) Tidy

func (f Workflow) Tidy()

func (*Workflow) Type

func (c *Workflow) Type() metadata.MetadataType

func (*Workflow) UpdateAlert

func (o *Workflow) UpdateAlert(alertName string, updates Alert) error

Jump to

Keyboard shortcuts

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