bpmn

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bpmn 提供 BPMN 2.0 XML 与 flow.Definition 的双向转换, 是 go-wind-flow 与 BPMN 生态(bpmn-js、Camunda Modeler 等)互通的桥梁。

支持子集与扩展约定见 docs/bpmn-compat.md。

Index

Constants

View Source
const FormatName = "bpmn-xml"

FormatName 注册到引擎的格式标识。

View Source
const NsFlow = "https://github.com/tx7do/go-wind-flow"

NsFlow go-wind-flow 扩展元素命名空间(approvers/timer 等自定义载荷)。

Variables

This section is empty.

Functions

func Parse

func Parse(data []byte) (*flow.Definition, error)

Parse BPMN 2.0 XML → Definition。

func ParseISODuration

func ParseISODuration(s string) (time.Duration, error)

ParseISODuration 解析 ISO 8601 时长(BPMN timeDuration 的标准形态,如 "PT24H"、"P1D"、"PT30M"、"PT1.5S")。

支持天/时/分/秒(含小数);年/月/周日历相关时长显式拒绝;零与负时长非法。

func Write

func Write(def *flow.Definition) ([]byte, error)

Write Definition → BPMN 2.0 XML(支持子集)。可被 bpmn-js / Camunda Modeler 打开。 若 def.Source 为含 DI 图形的 BPMN,导出回填图形与原命名空间声明(视觉无损)。

func WriteISODuration

func WriteISODuration(d time.Duration) string

WriteISODuration 反向编码为 ISO 8601(PTnHnMnS 形式,小时可超过 24)。

Types

type Exporter

type Exporter struct{}

Exporter 实现 flow.Exporter。

func (Exporter) Export

func (Exporter) Export(def *flow.Definition) ([]byte, error)

func (Exporter) Format

func (Exporter) Format() string

type Importer

type Importer struct{}

Importer 实现 flow.Importer。

func (Importer) Format

func (Importer) Format() string

func (Importer) Import

func (Importer) Import(data []byte) (*flow.Definition, error)

Jump to

Keyboard shortcuts

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