The project has moved. gobpmn is now called gobpmnLab. This repository is gobpmn's experimental laboratory, i.e. this is where the new modularity is being trialled, the shift away from the idea of dependent reflection towards a "read and write", with no frills.
The following examples are particularly worth mentioning in this repository
- Create File
- Create Instance
- Create Log
- View Elements and Methods
To create a BPMN file with a model from the given examples, you should perform the following steps, which are described below
First, clone the repository to your GOPATH (e.g. "~/go/src/github.com/[your_username]/gobpmnLab")
with HTTPS
git clone https://github.com/deemount/gobpmnLab.git
or with SSH
git clone [email protected]:deemount/gobpmnLab.git
Then, change directory to the repository
cd gobpmnLab
Finally, enter the following command in your shell
go run main.go
The result is a file in BPMN and JSON format, which is located in the /files/bpmn or /files/json directory. The name has a prefix and a consecutive number. A file with the name "diagram_[NUM].bpmn" or "diagram_[NUM].json" is therefore created after each command.
The settings for this execution are located in the /repository directory in the BpmnFactory.go file.
Open the file with an editor and make the change in the set method (see example below)
func (factory *bpmnFactory) set() {
log.Println("BpmnFactory.go: set model")
// e.g. use interface pointer (no argument)
//def := new(models.Definitions)
//repositoryModel := examples.NewModel(def)
// e.g. use struct pointer (no argument)
// 1
//factory.Repo = small_process.New().Build().Call()
factory.Repo = collaborative_process.New().Build().Call()
// 2
// repositoryModel := examples.NewBlackBoxModel()
//d := repositoryModel.Create()
//factory.Repo = d.Def()
// 3
//repositoryModel := examples.NewSimpleModel001()
//d := repositoryModel.Create()
//factory.Repo = d.Def()
}
Note: For some examples, you must also make a change in the toBPMN method. Simply comment out the line of code marked as a comment.
Once the models have been created, the BPMN file is read and a process instance is created. Not worth mentioning, it is an experiment, but can be viewed in the /repository directory in the BpmnEngine.go file.
I log as much as possible of what happens during execution in order to track what exactly happens where. This log can be viewed once in the terminal after executing go run main.go and as a more comprehensive version in the /logs directory, in the file build.log. There you will find further information that can help you to get an overview.
There is an attempt to create an interface using Go and HTML in the /public directory. The following steps must be carried out here:
cd public
go run main.go
Now open the browser at localhost:8080
There's actually no wiki for this repository installed ...
Start here gobpmn
In addition, a repository with available applications has now been created. Examples for execution are stored here.
- gobpmnTypes
- gobpmnModels
- gobpmnCamunda
- gobpmnDiagram
- gobpmnBuilder
- gobpmnCounter
- gobpmnHash
- gobpmnReflection
Note: gobpmnLab already imports the module gobpmnTypes and gobpmnDiagram (not complete).