dmn

package
v0.0.0-...-738d89c Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PreferredOrientationRuleAsRow    = "Rule-as-Row"
	PreferredOrientationRuleAsColumn = "Rule-as-Column"
	PreferredOrientationCrossTable   = "CrossTable"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuiltinAggregator

type BuiltinAggregator string
const (
	BuiltinAggregatorSUM   BuiltinAggregator = "SUM"
	BuiltinAggregatorMIN   BuiltinAggregator = "MIN"
	BuiltinAggregatorMAX   BuiltinAggregator = "MAX"
	BuiltinAggregatorCOUNT BuiltinAggregator = "COUNT"
)

type DMNElement

type DMNElement struct {
	Id          string `xml:"id,attr,omitempty"`
	Description string `xml:"description"`
	Label       string `xml:"label,attr,omitempty"`
}

type DMNElementReference

type DMNElementReference struct {
	Href string `xml:"href,attr"`
}

type DRGElement

type DRGElement struct {
	DMNElement
	Name string `xml:"name,attr"`
}

type Decision

type Decision struct {
	DRGElement
	Variable               *InformationItem         `xml:"variable"`
	InformationRequirement []InformationRequirement `xml:"informationRequirement"`
	DecisionTable          *DecisionTable           `xml:"decisionTable"`
	LiteralExpression      *LiteralExpression       `xml:"literalExpression"`
}

Decision is a decision element in a DMN model.

TODO not all fields are implemented yet.

type DecisionRule

type DecisionRule struct {
	DMNElement
	InputEntries  []UnaryTests        `xml:"inputEntry"`
	OutputEntries []LiteralExpression `xml:"outputEntry"`
}

type DecisionTable

type DecisionTable struct {
	Expression
	Inputs      []InputClause      `xml:"input"`
	Outputs     []OutputClause     `xml:"output"`
	Rules       []DecisionRule     `xml:"rule"`
	HitPolicy   HitPolicy          `xml:"hitPolicy,attr,omitempty"`
	Aggregation *BuiltinAggregator `xml:"aggregation,attr,omitempty"`
	//PreferredOrientation *PreferredOrientation `xml:"preferredOrientation,attr,omitempty"`
	OutputLabel string `xml:"outputLabel,attr,omitempty"`
}

type Definitions

type Definitions struct {
	NamedElement
	Decisions []Decision `xml:"decision"`
}

type Expression

type Expression struct {
	DMNElement
	TypeRef TypeRef `xml:"typeRef,attr"`
}

type HitPolicy

type HitPolicy string
const (
	HitPolicyUNIQUE      HitPolicy = "UNIQUE"
	HitPolicyFIRST       HitPolicy = "FIRST"
	HitPolicyPRIORITY    HitPolicy = "PRIORITY"
	HitPolicyANY         HitPolicy = "ANY"
	HitPolicyCOLLECT     HitPolicy = "COLLECT"
	HitPolicyRULEORDER   HitPolicy = "RULE ORDER"
	HitPolicyOUTPUTORDER HitPolicy = "OUTPUT ORDER"
)

type Import

type Import struct {
	Namespace   string `xml:"namespace,attr"`
	LocationURI string `xml:"locationURI,attr,omitempty"`
	ImportType  string `xml:"importType,attr"`
}

type ImportedValues

type ImportedValues struct {
	Import
	ImportedElement    string `xml:"importedElement"`
	ExpressionLanguage string `xml:"expressionLanguage,attr"`
}

type InformationItem

type InformationItem struct {
	NamedElement
	TypeRef string `xml:"typeRef,attr"`
}

type InformationRequirement

type InformationRequirement struct {
	DMNElement
	RequiredInput    *DMNElementReference `xml:"requiredInput"`
	RequiredDecision *DMNElementReference `xml:"requiredDecision"`
}

type InputClause

type InputClause struct {
	DMNElement
	InputExpression *LiteralExpression `xml:"inputExpression"`
	InputValues     []UnaryTests       `xml:"inputValues"`
}

type LiteralExpression

type LiteralExpression struct {
	Expression
	// choice of text or importedValues
	Text               string          `xml:"text"`
	ImportedValues     *ImportedValues `xml:"importedValues"`
	ExpressionLanguage string          `xml:"expressionLanguage,attr,omitempty"`
}

type NamedElement

type NamedElement struct {
	DMNElement
	Name string `xml:"name,attr"`
}

type OutputClause

type OutputClause struct {
	DMNElement
	OutputValues []UnaryTests `xml:"outputValues"`
	Name         string       `xml:"name,attr"`
	TypeRef      TypeRef      `xml:"typeRef,attr"`
}

type PreferredOrientation

type PreferredOrientation string

type TypeRef

type TypeRef string
var (
	TypeRefString            TypeRef = "string"
	TypeRefNumber            TypeRef = "number"
	TypeRefBoolean           TypeRef = "boolean"
	TypeRefDate              TypeRef = "date"
	TypeRefTime              TypeRef = "time"
	TypeRefDateTime          TypeRef = "dateTime"
	TypeRefDayTimeDuration   TypeRef = "dayTimeDuration"
	TypeRefYearMonthDuration TypeRef = "yearMonthDuration"
	TypeRefAny               TypeRef = "any"
)

type UnaryTests

type UnaryTests struct {
	DMNElement
	Text               string `xml:"text"`
	ExpressionLanguage string `xml:"expressionLanguage,attr,omitempty"`
}

Jump to

Keyboard shortcuts

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