gobpmn is an experimental library that makes it possible to reflect
- structs,
- anonymous fields,
- typed and
- generic maps
in Go and create business process models with it.
As a modeler with a CLI, gobpmn is a monorepo with clear encapsulation.
STILL IN DEVELOPMENT
- Go >= 1.24
Optional:
- Saxon >= 12.5 (Requires Java >= 23)
- Clone the repository or the download the .zip-File of the repository
- Install the latest gobpmn version as a package within a module with go get
- Install the latest gobpmn version as a package outside of a module with go install
go get github.com/deemount/gobpmn@latest
go install github.com/deemount/gobpmn@latest
go run examples/generic_map_simple_process/main.go
go run examples/typed_map_simple_process/main.go
go run examples/renting_process/main.go
go run examples/simple_process/main.go
go run examples/small_process/main.go
package main
import (
"log"
"github.com/deemount/gobpmn"
)
type Process struct {
Def gobpmn.Repository
IsExecutable bool
Process gobpmn.BPMN
StartEvent gobpmn.BPMN
FromStartEvent gobpmn.BPMN
Task gobpmn.BPMN
FromTask gobpmn.BPMN
EndEvent gobpmn.BPMN
}
func (p Process) GetDefinitions() gobpmn.Repository {
return p.Def
}
func main() {
_, err := gobpmn.FromStruct(Process{})
if err != nil {
log.Fatalf("ERROR: %s", err)
return
}
}
package main
import (
"log"
"github.com/deemount/gobpmn"
)
var Process = map[string]any{
"Def": gobpmn.Definitions(),
"IsExecutable": true,
"Process": gobpmn.BPMN{Pos: 1},
"StartEvent": gobpmn.BPMN{Pos: 2},
"FromStartEvent": gobpmn.BPMN{Pos: 3},
"Task": gobpmn.BPMN{Pos: 4},
"FromTask": gobpmn.BPMN{Pos: 5},
"EndEvent": gobpmn.BPMN{Pos: 6},
}
func main() {
type T any
_, err := gobpmn.FromMap[T](Process)
if err != nil {
log.Fatalf("ERROR: %s", err)
return
}
}
Read the documentation
Checkout the other projects for BPMN written in Go
Check my articles for this project on medium.com