Documentation
¶
Index ¶
- Constants
- func Deserialize(start *etree.Element) (any, error)
- func IsEndEvent(elem Element) bool
- func IsGateway(elem Element) bool
- func IsStartEvent(elem Element) bool
- func Serialize(element any, start *etree.Element) error
- type Builder
- func (b *Builder) AppendDep(dep string) *Builder
- func (b *Builder) AppendElem(elem Element) *Builder
- func (b *Builder) End() *Builder
- func (b *Builder) Id(id string) *Builder
- func (b *Builder) Out() (*Definitions, error)
- func (b *Builder) PopProperty() map[string]any
- func (b *Builder) SetProperty(key, value string) *Builder
- func (b *Builder) Start() *Builder
- type ConditionExpression
- type DataAssociation
- type DataObject
- func (o *DataObject) GetExtension() *ExtensionElement
- func (o *DataObject) GetID() string
- func (o *DataObject) GetIncoming() []string
- func (o *DataObject) GetName() string
- func (o *DataObject) GetOutgoing() []string
- func (o *DataObject) GetShape() Shape
- func (o *DataObject) SetExtension(elem *ExtensionElement)
- func (o *DataObject) SetID(id string)
- func (o *DataObject) SetIncoming(incoming []string)
- func (o *DataObject) SetName(name string)
- func (o *DataObject) SetOutgoing(outgoing []string)
- type DataReference
- type DataStore
- func (s *DataStore) GetExtension() *ExtensionElement
- func (s *DataStore) GetID() string
- func (s *DataStore) GetIncoming() []string
- func (s *DataStore) GetName() string
- func (s *DataStore) GetOutgoing() []string
- func (s *DataStore) GetShape() Shape
- func (s *DataStore) SetExtension(elem *ExtensionElement)
- func (s *DataStore) SetID(id string)
- func (s *DataStore) SetIncoming(incoming []string)
- func (s *DataStore) SetName(name string)
- func (s *DataStore) SetOutgoing(outgoing []string)
- type Definitions
- type Deserializer
- type Diagram
- type DiagramBounds
- type DiagramEdge
- type DiagramLabel
- type DiagramPlane
- type DiagramShape
- type DiagramWaypoint
- type Element
- type EndEvent
- func (e *EndEvent) GetExtension() *ExtensionElement
- func (e *EndEvent) GetID() string
- func (e *EndEvent) GetIncoming() []string
- func (e *EndEvent) GetName() string
- func (e *EndEvent) GetOutgoing() []string
- func (e *EndEvent) GetShape() Shape
- func (e *EndEvent) SetExtension(elem *ExtensionElement)
- func (e *EndEvent) SetID(id string)
- func (e *EndEvent) SetIncoming(incoming []string)
- func (e *EndEvent) SetName(name string)
- func (e *EndEvent) SetOutgoing(outgoing []string)
- type ExclusiveGateway
- type ExtensionElement
- type Gateway
- func (g *Gateway) GetExtension() *ExtensionElement
- func (g *Gateway) GetID() string
- func (g *Gateway) GetIncoming() []string
- func (g *Gateway) GetName() string
- func (g *Gateway) GetOutgoing() []string
- func (g *Gateway) GetShape() Shape
- func (g *Gateway) SetExtension(elem *ExtensionElement)
- func (g *Gateway) SetID(id string)
- func (g *Gateway) SetIncoming(incoming []string)
- func (g *Gateway) SetName(name string)
- func (g *Gateway) SetOutgoing(outgoing []string)
- type HeaderItem
- type IOMapping
- type InclusiveGateway
- type Mapping
- type ParallelGateway
- type Process
- func (p *Process) AfterInsertElem(src string, dst Element, cond *ConditionExpression) *Process
- func (p *Process) AppendElem(elem Element) *Process
- func (p *Process) BeforeInsertElem(dst string, src Element, cond *ConditionExpression) *Process
- func (p *Process) Draw() *DiagramPlane
- func (p *Process) GetExtension() *ExtensionElement
- func (p *Process) GetID() string
- func (p *Process) GetIncoming() []string
- func (p *Process) GetName() string
- func (p *Process) GetOutgoing() []string
- func (p *Process) GetShape() Shape
- func (p *Process) Link(src, dst string, cond *ConditionExpression) *Process
- func (p *Process) SetExtension(elem *ExtensionElement)
- func (p *Process) SetID(id string)
- func (p *Process) SetIncoming(incoming []string)
- func (p *Process) SetName(name string)
- func (p *Process) SetOutgoing(outgoing []string)
- type Properties
- type Property
- type SequenceFlow
- func (f *SequenceFlow) GetExtension() *ExtensionElement
- func (f *SequenceFlow) GetID() string
- func (f *SequenceFlow) GetIncoming() []string
- func (f *SequenceFlow) GetName() string
- func (f *SequenceFlow) GetOutgoing() []string
- func (f *SequenceFlow) GetShape() Shape
- func (f *SequenceFlow) SetExtension(elem *ExtensionElement)
- func (f *SequenceFlow) SetID(id string)
- func (f *SequenceFlow) SetIncoming(incoming []string)
- func (f *SequenceFlow) SetName(name string)
- func (f *SequenceFlow) SetOutgoing(outgoing []string)
- type Serializer
- type ServiceTask
- type Shape
- type StartEvent
- func (e *StartEvent) GetExtension() *ExtensionElement
- func (e *StartEvent) GetID() string
- func (e *StartEvent) GetIncoming() []string
- func (e *StartEvent) GetName() string
- func (e *StartEvent) GetOutgoing() []string
- func (e *StartEvent) GetShape() Shape
- func (e *StartEvent) SetExtension(elem *ExtensionElement)
- func (e *StartEvent) SetID(id string)
- func (e *StartEvent) SetIncoming(incoming []string)
- func (e *StartEvent) SetName(name string)
- func (e *StartEvent) SetOutgoing(outgoing []string)
- type Task
- func (t *Task) GetExtension() *ExtensionElement
- func (t *Task) GetID() string
- func (t *Task) GetIncoming() []string
- func (t *Task) GetName() string
- func (t *Task) GetOutgoing() []string
- func (t *Task) GetShape() Shape
- func (t *Task) SetExtension(elem *ExtensionElement)
- func (t *Task) SetID(id string)
- func (t *Task) SetIncoming(incoming []string)
- func (t *Task) SetName(name string)
- func (t *Task) SetOutgoing(outgoing []string)
- type TaskDefinition
- type TaskHeaders
- type TaskProperty
- type UserTask
Constants ¶
View Source
const ( TargetNamespace = "http://bpmn.io/schema/bpmn" BpmnModel = "http://www.omg.org/spec/BPMN/20100524/MODEL" BpmnDI = "http://www.omg.org/spec/BPMN/20100524/DI" BpmnDC = "http://www.omg.org/spec/DD/20100524/DC" BpmnSpecDI = "http://www.omg.org/spec/DD/20100524/DI" XSI = "http://www.w3.org/2001/XMLSchema-instance" Olive = "http://olive.io/spec/BPMN/MODEL" )
Variables ¶
This section is empty.
Functions ¶
func IsEndEvent ¶
func IsStartEvent ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder builds Definitions structure
func NewBuilder ¶
func (*Builder) AppendElem ¶
func (*Builder) Out ¶
func (b *Builder) Out() (*Definitions, error)
func (*Builder) PopProperty ¶ added in v0.11.0
func (*Builder) SetProperty ¶
type ConditionExpression ¶
type DataAssociation ¶
type DataObject ¶
type DataObject struct {
Id string
Name string
ExtensiveElement *ExtensionElement
}
func (*DataObject) GetExtension ¶
func (o *DataObject) GetExtension() *ExtensionElement
func (*DataObject) GetID ¶
func (o *DataObject) GetID() string
func (*DataObject) GetIncoming ¶
func (o *DataObject) GetIncoming() []string
func (*DataObject) GetName ¶
func (o *DataObject) GetName() string
func (*DataObject) GetOutgoing ¶
func (o *DataObject) GetOutgoing() []string
func (*DataObject) GetShape ¶
func (o *DataObject) GetShape() Shape
func (*DataObject) SetExtension ¶
func (o *DataObject) SetExtension(elem *ExtensionElement)
func (*DataObject) SetID ¶
func (o *DataObject) SetID(id string)
func (*DataObject) SetIncoming ¶
func (o *DataObject) SetIncoming(incoming []string)
func (*DataObject) SetName ¶
func (o *DataObject) SetName(name string)
func (*DataObject) SetOutgoing ¶
func (o *DataObject) SetOutgoing(outgoing []string)
type DataReference ¶
type DataStore ¶
type DataStore struct {
Id string
Name string
ExtensionElement *ExtensionElement
}
func (*DataStore) GetExtension ¶
func (s *DataStore) GetExtension() *ExtensionElement
func (*DataStore) GetIncoming ¶
func (*DataStore) GetOutgoing ¶
func (*DataStore) SetExtension ¶
func (s *DataStore) SetExtension(elem *ExtensionElement)
func (*DataStore) SetIncoming ¶
func (*DataStore) SetOutgoing ¶
type Definitions ¶
type Definitions struct {
Bpmn string
BpmnDI string
DC string
DI string
XSI string
Olive string
TargetNamespace string
Id string
Diagram *Diagram
// contains filtered or unexported fields
}
func FromXML ¶
func FromXML(text string) (*Definitions, error)
func NewDefinitions ¶
func NewDefinitions() *Definitions
func (*Definitions) AutoLayout ¶
func (d *Definitions) AutoLayout() *Definitions
func (*Definitions) DefaultProcess ¶
func (d *Definitions) DefaultProcess() (*Process, error)
func (*Definitions) NewProcess ¶
func (d *Definitions) NewProcess(p *Process) *Definitions
func (*Definitions) WriteToBytes ¶
func (d *Definitions) WriteToBytes() ([]byte, error)
func (*Definitions) WriteToFile ¶
func (d *Definitions) WriteToFile(path string) error
type Diagram ¶
type Diagram struct {
Id string
Planes []*DiagramPlane
}
type DiagramEdge ¶
type DiagramEdge struct {
Id string
Element string
Waypoints []*DiagramWaypoint
Label *DiagramLabel
}
type DiagramLabel ¶
type DiagramLabel struct {
Bounds *DiagramBounds
}
type DiagramPlane ¶
type DiagramPlane struct {
Id string
Element string
Shapes []*DiagramShape
Edges []*DiagramEdge
}
type DiagramShape ¶
type DiagramShape struct {
Id string
Element string
Label *DiagramLabel
Bounds *DiagramBounds
}
type DiagramWaypoint ¶
type EndEvent ¶
type EndEvent struct {
// contains filtered or unexported fields
}
func (*EndEvent) GetExtension ¶
func (e *EndEvent) GetExtension() *ExtensionElement
func (*EndEvent) GetIncoming ¶
func (*EndEvent) GetOutgoing ¶
func (*EndEvent) SetExtension ¶
func (e *EndEvent) SetExtension(elem *ExtensionElement)
func (*EndEvent) SetIncoming ¶
func (e *EndEvent) SetIncoming(incoming []string)
func (*EndEvent) SetOutgoing ¶
func (e *EndEvent) SetOutgoing(outgoing []string)
type ExclusiveGateway ¶
type ExclusiveGateway struct {
Gateway
}
func (*ExclusiveGateway) GetShape ¶
func (g *ExclusiveGateway) GetShape() Shape
type ExtensionElement ¶
type ExtensionElement struct {
Properties *Properties
Headers *TaskHeaders
TaskDefinition *TaskDefinition
IOMapping *IOMapping
}
type Gateway ¶
type Gateway struct {
Id string
Name string
Incoming []string
Outgoing []string
ExtensionElement *ExtensionElement
}
func (*Gateway) GetExtension ¶
func (g *Gateway) GetExtension() *ExtensionElement
func (*Gateway) GetIncoming ¶
func (*Gateway) GetOutgoing ¶
func (*Gateway) SetExtension ¶
func (g *Gateway) SetExtension(elem *ExtensionElement)
func (*Gateway) SetIncoming ¶
func (*Gateway) SetOutgoing ¶
type HeaderItem ¶
type InclusiveGateway ¶
type InclusiveGateway struct {
Gateway
}
func (*InclusiveGateway) GetShape ¶
func (g *InclusiveGateway) GetShape() Shape
type ParallelGateway ¶
type ParallelGateway struct {
Gateway
}
func (*ParallelGateway) GetShape ¶
func (g *ParallelGateway) GetShape() Shape
type Process ¶
type Process struct {
Id string
Name string
Executable bool
ExtensionElement *ExtensionElement
Elements *btree.Map[string, Element]
ObjectReferences *btree.Map[string, *DataReference]
StoreReferences *btree.Map[string, *DataReference]
// contains filtered or unexported fields
}
func NewProcess ¶
func (*Process) AfterInsertElem ¶
func (p *Process) AfterInsertElem(src string, dst Element, cond *ConditionExpression) *Process
AfterInsertElem inserts a new element to Process after the specified Element
func (*Process) AppendElem ¶
func (*Process) BeforeInsertElem ¶
func (p *Process) BeforeInsertElem(dst string, src Element, cond *ConditionExpression) *Process
BeforeInsertElem inserts a new element to Process before the specified Element
func (*Process) Draw ¶
func (p *Process) Draw() *DiagramPlane
func (*Process) GetExtension ¶
func (p *Process) GetExtension() *ExtensionElement
func (*Process) GetIncoming ¶
func (*Process) GetOutgoing ¶
func (*Process) SetExtension ¶
func (p *Process) SetExtension(elem *ExtensionElement)
func (*Process) SetIncoming ¶
func (*Process) SetOutgoing ¶
type Properties ¶
type Properties struct {
Items []*Property
}
type SequenceFlow ¶
type SequenceFlow struct {
Id string
Name string
SourceRef string
TargetRef string
Condition *ConditionExpression
ExtensionElement *ExtensionElement
}
func (*SequenceFlow) GetExtension ¶
func (f *SequenceFlow) GetExtension() *ExtensionElement
func (*SequenceFlow) GetID ¶
func (f *SequenceFlow) GetID() string
func (*SequenceFlow) GetIncoming ¶
func (f *SequenceFlow) GetIncoming() []string
func (*SequenceFlow) GetName ¶
func (f *SequenceFlow) GetName() string
func (*SequenceFlow) GetOutgoing ¶
func (f *SequenceFlow) GetOutgoing() []string
func (*SequenceFlow) GetShape ¶
func (f *SequenceFlow) GetShape() Shape
func (*SequenceFlow) SetExtension ¶
func (f *SequenceFlow) SetExtension(elem *ExtensionElement)
func (*SequenceFlow) SetID ¶
func (f *SequenceFlow) SetID(id string)
func (*SequenceFlow) SetIncoming ¶
func (f *SequenceFlow) SetIncoming(incoming []string)
func (*SequenceFlow) SetName ¶
func (f *SequenceFlow) SetName(name string)
func (*SequenceFlow) SetOutgoing ¶
func (f *SequenceFlow) SetOutgoing(outgoing []string)
type ServiceTask ¶
type ServiceTask struct {
Task
}
func NewServiceTask ¶
func NewServiceTask(name, typ string) *ServiceTask
func (*ServiceTask) GetShape ¶
func (t *ServiceTask) GetShape() Shape
func (*ServiceTask) SetHeader ¶
func (t *ServiceTask) SetHeader(key, value string)
func (*ServiceTask) SetProperty ¶
func (t *ServiceTask) SetProperty(name, value string)
type StartEvent ¶
type StartEvent struct {
// contains filtered or unexported fields
}
func (*StartEvent) GetExtension ¶
func (e *StartEvent) GetExtension() *ExtensionElement
func (*StartEvent) GetIncoming ¶
func (e *StartEvent) GetIncoming() []string
func (*StartEvent) GetOutgoing ¶
func (e *StartEvent) GetOutgoing() []string
func (*StartEvent) GetShape ¶
func (e *StartEvent) GetShape() Shape
func (*StartEvent) SetExtension ¶
func (e *StartEvent) SetExtension(elem *ExtensionElement)
func (*StartEvent) SetIncoming ¶
func (e *StartEvent) SetIncoming(incoming []string)
func (*StartEvent) SetOutgoing ¶
func (e *StartEvent) SetOutgoing(outgoing []string)
type Task ¶
type Task struct {
Id string
Name string
Incoming string
Outgoing string
Extension *ExtensionElement
Properties []*TaskProperty
DataInputAssociation []*DataAssociation
DataOutputAssociation []*DataAssociation
}
func (*Task) GetExtension ¶
func (t *Task) GetExtension() *ExtensionElement
func (*Task) GetIncoming ¶
func (*Task) GetOutgoing ¶
func (*Task) SetExtension ¶
func (t *Task) SetExtension(elem *ExtensionElement)
func (*Task) SetIncoming ¶
func (*Task) SetOutgoing ¶
type TaskDefinition ¶
type TaskHeaders ¶
type TaskHeaders struct {
Items []*HeaderItem
}
type TaskProperty ¶
Click to show internal directories.
Click to hide internal directories.