bpmnmodel

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StartEvent             ElementType = "START_EVENT"
	EndEvent               ElementType = "END_EVENT"
	ServiceTask            ElementType = "SERVICE_TASK"
	UserTask               ElementType = "USER_TASK"
	ParallelGateway        ElementType = "PARALLEL_GATEWAY"
	ExclusiveGateway       ElementType = "EXCLUSIVE_GATEWAY"
	IntermediateCatchEvent ElementType = "INTERMEDIATE_CATCH_EVENT"
	IntermediateThrowEvent ElementType = "INTERMEDIATE_THROW_EVENT"
	EventBasedGateway      ElementType = "EVENT_BASED_GATEWAY"
	InclusiveGateway       ElementType = "INCLUSIVE_GATEWAY"

	SequenceFlow ElementType = "SEQUENCE_FLOW"

	Unspecified GatewayDirection = "Unspecified"
	Converging  GatewayDirection = "Converging"
	Diverging   GatewayDirection = "Diverging"
	Mixed       GatewayDirection = "Mixed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseElement

type BaseElement interface {
	GetID() string
	GetName() string
	GetIncomingAssociation() []string
	GetOutgoingAssociation() []string
	GetType() ElementType
}

func FindBaseElementsByID

func FindBaseElementsByID(definitions *TDefinitions, id string) (elements []*BaseElement)

FindBaseElementsByID returns a list of base elements, that match the given ID

type ElementType

type ElementType string

type GatewayDirection

type GatewayDirection string

type GatewayElement

type GatewayElement interface {
	BaseElement
	IsParallel() bool
	IsExclusive() bool
	IsInclusive() bool
}

type TDefinitions

type TDefinitions struct {
	ID                 string     `xml:"id,attr"`              // ID 流程定义
	Name               string     `xml:"name,attr"`            // Name 流程定义名称
	TargetNamespace    string     `xml:"targetNamespace,attr"` // xml
	ExpressionLanguage string     `xml:"expressionLanguage,attr"`
	TypeLanguage       string     `xml:"typeLanguage,attr"`
	Exporter           string     `xml:"exporter,attr"`
	ExporterVersion    string     `xml:"exporterVersion,attr"`
	Process            TProcess   `xml:"process"`
	Messages           []TMessage `xml:"message"`
}

TDefinitions is the BPMN XML representation of a BPMN model

type TEndEvent

type TEndEvent struct {
	ID                  string   `xml:"id,attr"`
	Name                string   `xml:"name,attr"`
	IncomingAssociation []string `xml:"incoming"`
	OutgoingAssociation []string `xml:"outgoing"`
}

TEndEvent BPM End Event

func (TEndEvent) GetID

func (endEvent TEndEvent) GetID() string

func (TEndEvent) GetIncomingAssociation

func (endEvent TEndEvent) GetIncomingAssociation() []string

func (TEndEvent) GetName

func (endEvent TEndEvent) GetName() string

func (TEndEvent) GetOutgoingAssociation

func (endEvent TEndEvent) GetOutgoingAssociation() []string

func (TEndEvent) GetType

func (endEvent TEndEvent) GetType() ElementType

type TEventBasedGateway

type TEventBasedGateway struct {
	ID                  string   `xml:"id,attr"`
	Name                string   `xml:"name,attr"`
	IncomingAssociation []string `xml:"incoming"`
	OutgoingAssociation []string `xml:"outgoing"`
}

TEventBasedGateway BPMN Event Based Gateway

func (TEventBasedGateway) GetID

func (eventBasedGateway TEventBasedGateway) GetID() string

func (TEventBasedGateway) GetIncomingAssociation

func (eventBasedGateway TEventBasedGateway) GetIncomingAssociation() []string

func (TEventBasedGateway) GetName

func (eventBasedGateway TEventBasedGateway) GetName() string

func (TEventBasedGateway) GetOutgoingAssociation

func (eventBasedGateway TEventBasedGateway) GetOutgoingAssociation() []string

func (TEventBasedGateway) GetType

func (eventBasedGateway TEventBasedGateway) GetType() ElementType

func (TEventBasedGateway) IsExclusive

func (eventBasedGateway TEventBasedGateway) IsExclusive() bool

func (TEventBasedGateway) IsInclusive

func (eventBasedGateway TEventBasedGateway) IsInclusive() bool

func (TEventBasedGateway) IsParallel

func (eventBasedGateway TEventBasedGateway) IsParallel() bool

type TExclusiveGateway

type TExclusiveGateway struct {
	ID                  string   `xml:"id,attr"`
	Name                string   `xml:"name,attr"`
	IncomingAssociation []string `xml:"incoming"`
	OutgoingAssociation []string `xml:"outgoing"`
}

TExclusiveGateway BPMN Exclusive Gateway

func (TExclusiveGateway) GetID

func (exclusiveGateway TExclusiveGateway) GetID() string

func (TExclusiveGateway) GetIncomingAssociation

func (exclusiveGateway TExclusiveGateway) GetIncomingAssociation() []string

func (TExclusiveGateway) GetName

func (exclusiveGateway TExclusiveGateway) GetName() string

func (TExclusiveGateway) GetOutgoingAssociation

func (exclusiveGateway TExclusiveGateway) GetOutgoingAssociation() []string

func (TExclusiveGateway) GetType

func (exclusiveGateway TExclusiveGateway) GetType() ElementType

func (TExclusiveGateway) IsExclusive

func (exclusiveGateway TExclusiveGateway) IsExclusive() bool

func (TExclusiveGateway) IsInclusive

func (exclusiveGateway TExclusiveGateway) IsInclusive() bool

func (TExclusiveGateway) IsParallel

func (exclusiveGateway TExclusiveGateway) IsParallel() bool

type TExpression

type TExpression struct {
	Text string `xml:",innerxml"`
}

TExpression is the BPMN XML representation of an expression

type TInclusiveGateway

type TInclusiveGateway struct {
	ID                  string   `xml:"id,attr"`
	Name                string   `xml:"name,attr"`
	IncomingAssociation []string `xml:"incoming"`
	OutgoingAssociation []string `xml:"outgoing"`
}

TInclusiveGateway BPMN Inclusive Gateway

func (TInclusiveGateway) GetID

func (inclusiveGateway TInclusiveGateway) GetID() string

func (TInclusiveGateway) GetIncomingAssociation

func (inclusiveGateway TInclusiveGateway) GetIncomingAssociation() []string

func (TInclusiveGateway) GetName

func (inclusiveGateway TInclusiveGateway) GetName() string

func (TInclusiveGateway) GetOutgoingAssociation

func (inclusiveGateway TInclusiveGateway) GetOutgoingAssociation() []string

func (TInclusiveGateway) GetType

func (inclusiveGateway TInclusiveGateway) GetType() ElementType

func (TInclusiveGateway) IsExclusive

func (inclusiveGateway TInclusiveGateway) IsExclusive() bool

func (TInclusiveGateway) IsInclusive

func (inclusiveGateway TInclusiveGateway) IsInclusive() bool

func (TInclusiveGateway) IsParallel

func (inclusiveGateway TInclusiveGateway) IsParallel() bool

type TIntermediateCatchEvent

type TIntermediateCatchEvent struct {
	ID                     string                  `xml:"id,attr"`
	Name                   string                  `xml:"name,attr"`
	IncomingAssociation    []string                `xml:"incoming"`
	OutgoingAssociation    []string                `xml:"outgoing"`
	MessageEventDefinition TMessageEventDefinition `xml:"messageEventDefinition"`
	TimerEventDefinition   TTimerEventDefinition   `xml:"timerEventDefinition"`
	LinkEventDefinition    TLinkEventDefinition    `xml:"linkEventDefinition"`
	ParallelMultiple       bool                    `xml:"parallelMultiple"`
	Output                 []extensions.TIoMapping `xml:"extensionElements>ioMapping>output"`
}

TIntermediateCatchEvent BPMN Intermediate Catch Event

func (TIntermediateCatchEvent) GetID

func (intermediateCatchEvent TIntermediateCatchEvent) GetID() string

func (TIntermediateCatchEvent) GetIncomingAssociation

func (intermediateCatchEvent TIntermediateCatchEvent) GetIncomingAssociation() []string

func (TIntermediateCatchEvent) GetName

func (intermediateCatchEvent TIntermediateCatchEvent) GetName() string

func (TIntermediateCatchEvent) GetOutgoingAssociation

func (intermediateCatchEvent TIntermediateCatchEvent) GetOutgoingAssociation() []string

func (TIntermediateCatchEvent) GetType

func (intermediateCatchEvent TIntermediateCatchEvent) GetType() ElementType

type TIntermediateThrowEvent

type TIntermediateThrowEvent struct {
	ID                  string                  `xml:"id,attr"`
	Name                string                  `xml:"name,attr"`
	IncomingAssociation []string                `xml:"incoming"`
	LinkEventDefinition TLinkEventDefinition    `xml:"linkEventDefinition"`
	Output              []extensions.TIoMapping `xml:"extensionElements>ioMapping>output"`
}

TIntermediateThrowEvent BPMN Intermediate Throw Event

func (TIntermediateThrowEvent) GetID

func (intermediateThrowEvent TIntermediateThrowEvent) GetID() string

func (TIntermediateThrowEvent) GetIncomingAssociation

func (intermediateThrowEvent TIntermediateThrowEvent) GetIncomingAssociation() []string

func (TIntermediateThrowEvent) GetName

func (intermediateThrowEvent TIntermediateThrowEvent) GetName() string

func (TIntermediateThrowEvent) GetOutgoingAssociation

func (intermediateThrowEvent TIntermediateThrowEvent) GetOutgoingAssociation() []string

func (TIntermediateThrowEvent) GetType

func (intermediateThrowEvent TIntermediateThrowEvent) GetType() ElementType

type TLinkEventDefinition

type TLinkEventDefinition struct {
	ID   string `xml:"id,attr"`
	Name string `xml:"name,attr"`
}

TLinkEventDefinition BPMN Link Event Definition

type TMessage

type TMessage struct {
	ID   string `xml:"id,attr"`
	Name string `xml:"name,attr"`
}

TMessage BPMN Message

type TMessageEventDefinition

type TMessageEventDefinition struct {
	ID         string `xml:"id,attr"`
	MessageRef string `xml:"messageRef,attr"`
}

TMessageEventDefinition BPMN Message Event Definition

type TParallelGateway

type TParallelGateway struct {
	ID                  string   `xml:"id,attr"`
	Name                string   `xml:"name,attr"`
	IncomingAssociation []string `xml:"incoming"`
	OutgoingAssociation []string `xml:"outgoing"`
}

TParallelGateway BPMN Parallel Gateway

func (TParallelGateway) GetID

func (parallelGateway TParallelGateway) GetID() string

func (TParallelGateway) GetIncomingAssociation

func (parallelGateway TParallelGateway) GetIncomingAssociation() []string

func (TParallelGateway) GetName

func (parallelGateway TParallelGateway) GetName() string

func (TParallelGateway) GetOutgoingAssociation

func (parallelGateway TParallelGateway) GetOutgoingAssociation() []string

func (TParallelGateway) GetType

func (parallelGateway TParallelGateway) GetType() ElementType

func (TParallelGateway) IsExclusive

func (parallelGateway TParallelGateway) IsExclusive() bool

func (TParallelGateway) IsInclusive

func (parallelGateway TParallelGateway) IsInclusive() bool

func (TParallelGateway) IsParallel

func (parallelGateway TParallelGateway) IsParallel() bool

type TProcess

type TProcess struct {
	ID                           string                    `xml:"id,attr"`
	Name                         string                    `xml:"name,attr"`
	ProcessType                  string                    `xml:"processType,attr"`
	IsClosed                     bool                      `xml:"isClosed,attr"`
	IsExecutable                 bool                      `xml:"isExecutable,attr"`
	DefinitionalCollaborationRef string                    `xml:"definitionalCollaborationRef,attr"`
	StartEvents                  []TStartEvent             `xml:"startEvent"`
	EndEvents                    []TEndEvent               `xml:"endEvent"`
	SequenceFlows                []TSequenceFlow           `xml:"sequenceFlow"`
	ServiceTasks                 []TServiceTask            `xml:"serviceTask"`
	UserTasks                    []TUserTask               `xml:"userTask"`
	ParallelGateway              []TParallelGateway        `xml:"parallelGateway"`
	ExclusiveGateway             []TExclusiveGateway       `xml:"exclusiveGateway"`
	IntermediateCatchEvent       []TIntermediateCatchEvent `xml:"intermediateCatchEvent"`
	IntermediateTrowEvent        []TIntermediateThrowEvent `xml:"intermediateThrowEvent"`
	EventBasedGateway            []TEventBasedGateway      `xml:"eventBasedGateway"`
}

TProcess is the BPMN XML representation of a process

type TSequenceFlow

type TSequenceFlow struct {
	ID                  string        `xml:"id,attr"`
	Name                string        `xml:"name,attr"`
	SourceRef           string        `xml:"sourceRef,attr"`
	TargetRef           string        `xml:"targetRef,attr"`
	ConditionExpression []TExpression `xml:"conditionExpression"`
}

TSequenceFlow is the BPMN XML representation of a sequence flow

func FindSequenceFlow

func FindSequenceFlow(sequenceFlows *[]TSequenceFlow, sourceID string, targetID string) (result *TSequenceFlow)

FindSequenceFlow TODO: warning: one can define multiple flows from one element to another

func FindSequenceFlows

func FindSequenceFlows(sequenceFlows *[]TSequenceFlow, ids []string) (ret []TSequenceFlow)

FindSequenceFlows returns a list of sequence flows, that match the given IDs

func (TSequenceFlow) GetConditionExpression

func (flow TSequenceFlow) GetConditionExpression() string

GetConditionExpression returns the embedded expression. There will be a panic thrown, in case none exists!

func (TSequenceFlow) HasConditionExpression

func (flow TSequenceFlow) HasConditionExpression() bool

HasConditionExpression returns true, if there's exactly 1 expression present (as by the spec) and there's some non-whitespace-characters available

type TServiceTask

type TServiceTask struct {
	ID                  string                     `xml:"id,attr"`
	Name                string                     `xml:"name,attr"`
	Default             string                     `xml:"default,attr"`
	CompletionQuantity  int                        `xml:"completionQuantity,attr"`
	IsForCompensation   bool                       `xml:"isForCompensation,attr"`
	OperationRef        string                     `xml:"operationRef,attr"`
	Implementation      string                     `xml:"implementation,attr"`
	IncomingAssociation []string                   `xml:"incoming"`
	OutgoingAssociation []string                   `xml:"outgoing"`
	Input               []extensions.TIoMapping    `xml:"extensionElements>ioMapping>input"`
	Output              []extensions.TIoMapping    `xml:"extensionElements>ioMapping>output"`
	TaskDefinition      extensions.TTaskDefinition `xml:"extensionElements>taskDefinition"`
}

TServiceTask BPMN Service Task

func (TServiceTask) GetAssignmentAssignee

func (serviceTask TServiceTask) GetAssignmentAssignee() string

func (TServiceTask) GetAssignmentCandidateGroups

func (serviceTask TServiceTask) GetAssignmentCandidateGroups() []string

func (TServiceTask) GetID

func (serviceTask TServiceTask) GetID() string

func (TServiceTask) GetIncomingAssociation

func (serviceTask TServiceTask) GetIncomingAssociation() []string

func (TServiceTask) GetInputMapping

func (serviceTask TServiceTask) GetInputMapping() []extensions.TIoMapping

func (TServiceTask) GetName

func (serviceTask TServiceTask) GetName() string

func (TServiceTask) GetOutgoingAssociation

func (serviceTask TServiceTask) GetOutgoingAssociation() []string

func (TServiceTask) GetOutputMapping

func (serviceTask TServiceTask) GetOutputMapping() []extensions.TIoMapping

func (TServiceTask) GetTaskDefinitionType

func (serviceTask TServiceTask) GetTaskDefinitionType() string

func (TServiceTask) GetType

func (serviceTask TServiceTask) GetType() ElementType

type TStartEvent

type TStartEvent struct {
	ID                  string   `xml:"id,attr"`
	Name                string   `xml:"name,attr"`
	IsInterrupting      bool     `xml:"isInterrupting,attr"`
	ParallelMultiple    bool     `xml:"parallelMultiple,attr"`
	IncomingAssociation []string `xml:"incoming"`
	OutgoingAssociation []string `xml:"outgoing"`
}

TStartEvent BPMN Start Event

func (TStartEvent) GetID

func (startEvent TStartEvent) GetID() string

func (TStartEvent) GetIncomingAssociation

func (startEvent TStartEvent) GetIncomingAssociation() []string

func (TStartEvent) GetName

func (startEvent TStartEvent) GetName() string

func (TStartEvent) GetOutgoingAssociation

func (startEvent TStartEvent) GetOutgoingAssociation() []string

func (TStartEvent) GetType

func (startEvent TStartEvent) GetType() ElementType

type TTimeDuration

type TTimeDuration struct {
	XMLText string `xml:",innerxml"`
}

TTimeDuration BPMN Time Duration

type TTimerEventDefinition

type TTimerEventDefinition struct {
	ID           string        `xml:"id,attr"`
	TimeDuration TTimeDuration `xml:"timeDuration"`
}

TTimerEventDefinition BPMN Timer Event Definition

type TUserTask

type TUserTask struct {
	ID                   string                           `xml:"id,attr"`
	Name                 string                           `xml:"name,attr"`
	IncomingAssociation  []string                         `xml:"incoming"`
	OutgoingAssociation  []string                         `xml:"outgoing"`
	Input                []extensions.TIoMapping          `xml:"extensionElements>ioMapping>input"`
	Output               []extensions.TIoMapping          `xml:"extensionElements>ioMapping>output"`
	AssignmentDefinition extensions.TAssignmentDefinition `xml:"extensionElements>assignmentDefinition"`
}

TUserTask BPMN User Task

func (TUserTask) GetAssignmentAssignee

func (userTask TUserTask) GetAssignmentAssignee() string

func (TUserTask) GetAssignmentCandidateGroups

func (userTask TUserTask) GetAssignmentCandidateGroups() []string

func (TUserTask) GetID

func (userTask TUserTask) GetID() string

func (TUserTask) GetIncomingAssociation

func (userTask TUserTask) GetIncomingAssociation() []string

func (TUserTask) GetInputMapping

func (userTask TUserTask) GetInputMapping() []extensions.TIoMapping

func (TUserTask) GetName

func (userTask TUserTask) GetName() string

func (TUserTask) GetOutgoingAssociation

func (userTask TUserTask) GetOutgoingAssociation() []string

func (TUserTask) GetOutputMapping

func (userTask TUserTask) GetOutputMapping() []extensions.TIoMapping

func (TUserTask) GetTaskDefinitionType

func (userTask TUserTask) GetTaskDefinitionType() string

func (TUserTask) GetType

func (userTask TUserTask) GetType() ElementType

type TaskElement

type TaskElement interface {
	BaseElement
	GetInputMapping() []extensions.TIoMapping
	GetOutputMapping() []extensions.TIoMapping
	GetTaskDefinitionType() string
	GetAssignmentAssignee() string
	GetAssignmentCandidateGroups() []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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