Documentation ¶
Index ¶
- Variables
- func AsFloat(in interface{}) float64
- func AsInt(in interface{}) int64
- func AsStr(val interface{}) interface{}
- func EvaluateExpressionToDuration(exp string) (du time.Duration, err error)
- func EvaluateExpressionToString(exp string, input vars.Mapping) (string, error)
- func FormatDuration(dur time.Duration) string
- func IsFormal(exp string) bool
- func ParseDuration(isoDuration string) (time.Duration, error)
- type Activity
- type AssignmentDefinition
- func (a AssignmentDefinition) ConvertValue(val any) ([]string, error)
- func (a AssignmentDefinition) CountAssignees() (count int)
- func (a AssignmentDefinition) GetAssignee(input vars.Mapping) (string, error)
- func (a AssignmentDefinition) GetCandidateGroups(input vars.Mapping) ([]string, error)
- func (a AssignmentDefinition) GetCandidateUsers(input vars.Mapping) ([]string, error)
- type BaseElement
- type BaseElementWithMixedContent
- type BusinessRuleTask
- type CallActivity
- type CalledDecision
- type CalledElement
- type CatchEvent
- type ComplexGateway
- type ConditionExpression
- type Converter
- type Definitions
- type Documentation
- type Elementor
- type EndEvent
- type Event
- type EventBasedGateway
- type EventBasedGatewayType
- type EventDefinition
- type ExclusiveGateway
- type Expression
- type ExtensionProperties
- type ExtensionProperty
- type FlowElement
- type FlowNode
- type FormDefinition
- type FormalExpression
- type Gateway
- type GatewayDirection
- type Header
- type InclusiveGateway
- type Input
- type IntermediateCatchEvent
- type LoopCharacteristics
- type ManualTask
- type Message
- type MessageEventDefinition
- type MultiInstanceLoopCharacteristics
- type Output
- type ParallelGateway
- type Process
- type ProcessType
- type ReceiveTask
- type RootElement
- type Script
- type ScriptTask
- type SendTask
- type SequenceFlow
- type ServiceTask
- type Signal
- type SignalEventDefinition
- type StartEvent
- type Subscription
- type Task
- type TaskDefinition
- type ThrowEvent
- type TimerEventDefinition
- type UserTask
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExpressionResultNotString = errors.New("expression result is not string") ErrExpressionResultNotInt = errors.New("expression result is not int") ErrExpressionResultNotBool = errors.New("condition expression result is not bool") )
View Source
var ErrISO8601DurationFormat = errors.New("input string is of incorrect format")
Functions ¶
func EvaluateExpressionToDuration ¶
EvaluateExpressionToDuration evaluate iso8601 format to time.Duration
func FormatDuration ¶
FormatDuration returns an ISO 8601 duration string.
Types ¶
type AssignmentDefinition ¶
type AssignmentDefinition struct { Assignee string `xml:"assignee,attr"` CandidateGroups string `xml:"candidateGroups,attr"` CandidateUsers string `xml:"candidateUsers,attr"` }
func (AssignmentDefinition) ConvertValue ¶
func (a AssignmentDefinition) ConvertValue(val any) ([]string, error)
func (AssignmentDefinition) CountAssignees ¶
func (a AssignmentDefinition) CountAssignees() (count int)
CountAssignees count assignees
func (AssignmentDefinition) GetAssignee ¶
func (a AssignmentDefinition) GetAssignee(input vars.Mapping) (string, error)
func (AssignmentDefinition) GetCandidateGroups ¶
func (a AssignmentDefinition) GetCandidateGroups(input vars.Mapping) ([]string, error)
func (AssignmentDefinition) GetCandidateUsers ¶
func (a AssignmentDefinition) GetCandidateUsers(input vars.Mapping) ([]string, error)
type BaseElement ¶
type BaseElement struct { Id string `xml:"id,attr"` Documentation []Documentation `xml:"documentation,omitempty"` ExtensionProperties ExtensionProperties `xml:"extensionElements>properties>property,omitempty"` }
func (*BaseElement) GetDocumentation ¶
func (be *BaseElement) GetDocumentation() string
type BaseElementWithMixedContent ¶
type BaseElementWithMixedContent struct { Id string `xml:"id,attr,omitempty"` Content string `xml:",innerxml"` Documentation *Documentation `xml:"documentation,omitempty"` }
func (*BaseElementWithMixedContent) UnmarshalXML ¶
func (b *BaseElementWithMixedContent) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
type BusinessRuleTask ¶
type BusinessRuleTask struct { Task TaskDefinition *TaskDefinition `xml:"extensionElements>taskDefinition,omitempty"` Inputs []Input `xml:"extensionElements>ioMapping>input,omitempty"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` Headers []Header `xml:"extensionElements>taskHeaders>header,omitempty"` Script *Script `xml:"extensionElements>script"` CalledDecision *CalledDecision `xml:"extensionElements>calledDecision"` }
type CallActivity ¶
type CallActivity struct { Activity CalledElement CalledElement `xml:"extensionElements>calledElement"` Inputs []Input `xml:"extensionElements>ioMapping>input,omitempty"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` }
type CalledDecision ¶
type CalledElement ¶
type CatchEvent ¶
type CatchEvent struct {
Event
}
type ComplexGateway ¶
type ComplexGateway struct { Gateway ActivationCondition *Expression `xml:"activationCondition,attr,omitempty"` Default string `xml:"default,attr"` }
type ConditionExpression ¶
type ConditionExpression struct { FormalExpression Type string `xml:"type,attr"` Resource string `xml:"resource,attr"` }
ConditionExpression is camunda extension
func (ConditionExpression) Evaluate ¶
func (c ConditionExpression) Evaluate(input map[string]any) (bool, error)
Evaluate condition expression. Camunda FEEL format is no like golang expression.
Supported operators:
`=`: FEEL equality, golang expression `==`.. note support in quote string like `="a=b"`
type Converter ¶
type Converter interface { // ConvertDecisionTable convert decision table to other grammar ConvertDecisionTable(decisionID string, table *dmn.DecisionTable) ([]string, error) // Match bool evaluate Match(rule string, input vars.Mapping) (bool, error) Eval(rule string, input vars.Mapping) (any, error) }
Converter convert dmn decision feel expression to other grammar
var Convert Converter
type Definitions ¶
type Definitions struct { BaseElement TargetNamespace string `xml:"targetNamespace,attr"` ExpressionLanguage string `xml:"expressionLanguage,attr"` TypeLanguage string `xml:"typeLanguage,attr"` Exporter string `xml:"exporter,attr"` ExporterVersion string `xml:"exporterVersion,attr"` Process []Process `json:"process,omitempty" xml:"process"` Messages []Message `json:"message,omitempty" xml:"message"` Signals []Signal `json:"signal,omitempty" xml:"signal"` }
type Documentation ¶
type EndEvent ¶
type EndEvent struct {
ThrowEvent
}
type EventBasedGateway ¶
type EventBasedGateway struct { Gateway Instantiate bool `xml:"instantiate,attr"` EventBasedGatewayType EventBasedGatewayType `xml:"eventGatewayType,attr"` }
type EventBasedGatewayType ¶
type EventBasedGatewayType string
const ( EventBasedGatewayTypeExclusive EventBasedGatewayType = "Exclusive" EventBasedGatewayTypeParallel EventBasedGatewayType = "Parallel" )
type EventDefinition ¶
type EventDefinition struct {
RootElement
}
type ExclusiveGateway ¶
type ExclusiveGateway struct {
Gateway
}
func (ExclusiveGateway) GetId ¶
func (e ExclusiveGateway) GetId() string
func (ExclusiveGateway) GetOutgoing ¶
func (e ExclusiveGateway) GetOutgoing() []string
type Expression ¶
type Expression struct {
BaseElementWithMixedContent
}
type ExtensionProperties ¶
type ExtensionProperties []ExtensionProperty
func (ExtensionProperties) Decode ¶
func (ep ExtensionProperties) Decode(valuePtr any) error
type ExtensionProperty ¶
type FlowElement ¶
type FlowElement struct { BaseElement Name string `xml:"name,attr"` }
type FlowNode ¶
type FlowNode struct { FlowElement Tag string `xml:"tag,attr"` Incoming []string `xml:"incoming"` Outgoing []string `xml:"outgoing"` }
func (FlowNode) GetOutgoing ¶
type FormDefinition ¶
type FormDefinition struct {
FormKey string `xml:"formKey,attr"`
}
type FormalExpression ¶
type FormalExpression struct { Expression Language string `xml:"language,omitempty,attr"` EvaluatesToTypeRef string `xml:"evaluatesToTypeRef,attr"` }
type Gateway ¶
type Gateway struct { FlowNode GatewayDirection GatewayDirection `xml:"gatewayDirection,attr"` }
type GatewayDirection ¶
type GatewayDirection string
const ( GatewayDirectionUnspecified GatewayDirection = "Unspecified" GatewayDirectionConverging GatewayDirection = "Converging" GatewayDirectionDiverging GatewayDirection = "Diverging" GatewayDirectionMixed GatewayDirection = "Mixed" )
type InclusiveGateway ¶
type IntermediateCatchEvent ¶
type IntermediateCatchEvent struct { CatchEvent TimerEventDefinition *TimerEventDefinition `xml:"timerEventDefinition,omitempty"` MessageEventDefinition *MessageEventDefinition `xml:"messageEventDefinition,omitempty"` SignalEventDefinition *SignalEventDefinition `xml:"signalEventDefinition,omitempty"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` }
type LoopCharacteristics ¶
type ManualTask ¶
type ManualTask struct {
Task
}
type Message ¶
type Message struct { RootElement Name string `xml:"name,attr"` Subscription *Subscription `xml:"extensionElements>subscription"` }
type MessageEventDefinition ¶
type MessageEventDefinition struct { EventDefinition MessageRef string `xml:"messageRef,attr"` }
type MultiInstanceLoopCharacteristics ¶
type MultiInstanceLoopCharacteristics struct { IsSequential bool `xml:"isSequential,attr"` LoopCharacteristics LoopCharacteristics `xml:"extensionElements>loopCharacteristics"` CompletionCondition *FormalExpression `xml:"completionCondition"` }
MultiInstanceLoopCharacteristics is a loop characteristics for multi instance
type Output ¶
type ParallelGateway ¶
type Process ¶
type Process struct { BaseElement Name string `xml:"name,attr"` ProcessType ProcessType `xml:"processType,attr"` IsClosed bool `xml:"isClosed,attr"` IsExecutable bool `xml:"isExecutable,attr"` DefinitionalCollaborationRef string `xml:"definitionalCollaborationRef,attr"` StartEvents []*StartEvent `xml:"startEvent"` EndEvents []*EndEvent `xml:"endEvent"` UserTasks []*UserTask `xml:"userTask"` ServiceTasks []*ServiceTask `xml:"serviceTask"` BusinessRules []*BusinessRuleTask `xml:"businessRuleTask"` SequenceFlows []*SequenceFlow `xml:"sequenceFlow"` CallActivities []*CallActivity `xml:"callActivity"` ExclusiveGateways []*ExclusiveGateway `xml:"exclusiveGateway"` InclusiveGateways []*InclusiveGateway `xml:"inclusiveGateway"` ParallelGateways []*ParallelGateway `xml:"parallelGateway"` EventBasedGateways []*EventBasedGateway `xml:"eventBasedGateway"` IntermediateCatchEvents []*IntermediateCatchEvent `xml:"intermediateCatchEvent"` // camunda:properties VersionTag string `xml:"versionTag,attr"` }
func (Process) FindBaseElementsById ¶
type ProcessType ¶
type ProcessType string
const ( ProcessTypeNode ProcessType = "None" ProcessTypePublic ProcessType = "Public" ProcessTypePrivate ProcessType = "Private" )
type ReceiveTask ¶
type ReceiveTask struct { Task MessageRef string `xml:"messageRef,attr"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` Subscription *Subscription `xml:"extensionElements>subscription"` }
type RootElement ¶
type RootElement struct {
BaseElement
}
type ScriptTask ¶
type ScriptTask struct { Task TaskDefinition *TaskDefinition `xml:"extensionElements>taskDefinition,omitempty"` Inputs []Input `xml:"extensionElements>ioMapping>input,omitempty"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` Headers []Header `xml:"extensionElements>taskHeaders>header,omitempty"` Script *Script `xml:"extensionElements>script,omitempty"` }
type SendTask ¶
type SendTask struct { Task TaskDefinition *TaskDefinition `xml:"extensionElements>taskDefinition,omitempty"` Inputs []Input `xml:"extensionElements>ioMapping>input,omitempty"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` Headers []Header `xml:"extensionElements>taskHeaders>header,omitempty"` }
type SequenceFlow ¶
type SequenceFlow struct { FlowElement ConditionExpression *ConditionExpression `xml:"conditionExpression"` SourceRef string `xml:"sourceRef,attr"` TargetRef string `xml:"targetRef,attr"` IsImmediate bool `xml:"isImmediate,attr"` }
func (SequenceFlow) GetID ¶
func (s SequenceFlow) GetID() string
type ServiceTask ¶
type ServiceTask struct { Task TaskDefinition *TaskDefinition `xml:"extensionElements>taskDefinition,omitempty"` Inputs []Input `xml:"extensionElements>ioMapping>input,omitempty"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` Headers []Header `xml:"extensionElements>taskHeaders>header,omitempty"` }
type Signal ¶
type Signal struct { RootElement Name string `xml:"name,attr"` }
type SignalEventDefinition ¶
type SignalEventDefinition struct { EventDefinition SignalRef string `xml:"signalRef,attr"` }
type StartEvent ¶
type StartEvent struct { CatchEvent MessageEventDefinition *MessageEventDefinition `xml:"messageEventDefinition,omitempty"` IsInterrupting bool `xml:"isInterrupting,attr"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` }
type Subscription ¶
type Subscription struct {
CorrelationKey string `xml:"correlationKey,attr"`
}
type TaskDefinition ¶
type TaskDefinition struct { TypeName string `xml:"type,attr"` Retries string `xml:"retries,attr"` }
func (TaskDefinition) GetRetries ¶
func (t TaskDefinition) GetRetries() (retries int, err error)
func (TaskDefinition) GetType ¶
func (t TaskDefinition) GetType() (string, error)
type ThrowEvent ¶
type ThrowEvent struct {
Event
}
type TimerEventDefinition ¶
type TimerEventDefinition struct { EventDefinition TimeDate *Expression `xml:"timeDate"` TimeDuration *Expression `xml:"timeDuration"` TimeCycle *Expression `xml:"timeCycle"` }
type UserTask ¶
type UserTask struct { Task Form *FormDefinition `xml:"extensionElements>formDefinition"` Assignment *AssignmentDefinition `xml:"extensionElements>assignmentDefinition"` Inputs []Input `xml:"extensionElements>ioMapping>input,omitempty"` Outputs []Output `xml:"extensionElements>ioMapping>output,omitempty"` Headers []Header `xml:"extensionElements>taskHeaders>header,omitempty"` MultiInstance *MultiInstanceLoopCharacteristics `xml:"multiInstanceLoopCharacteristics"` }
Click to show internal directories.
Click to hide internal directories.