A BPMN engine, meant to be embedded in Go applications with minim hurdles, and a pleasant developer experience using it.

lib-bpmn-engine

Motivation

A BPMN engine, meant to be embedded in Go applications with minimum hurdles, and a pleasant developer experience using it. This approach can increase transparency for non-developers.

This library is meant to be embedded in your application and should not introduce more runtime-dependencies. Hence, there's not DB-support built nor planned. Also, the engine is not agnostic to any high availability approaches, like multiple instances or similar.

Think of an OpenAPI/Swagger spec can be served with your service - such could be done with a BPMN file.

Philosophies around BPMN

The BPMN specification in its core is just about the rectangles, arrows, and how to interpret them. With this foundation, it's an excellent opportunity to enrich transparency or communication or discussions about implementation details. So BPMN has a great potential to support me as a developer to not write documentation into a wiki but rather expose the business process via well known symbols/graphics.

Usage Example

See example_test.go

Current Implementation State

This is very early development. A simple 'hello world' task can be executed.

Plenty of other BPMN elements left to be supported.

Comments
  • implement multiple variable scope #48

    implement multiple variable scope #48

    I'm try to implement multiple variable scope in orde to support input variable mapping in local scope.
    

    It contains some break change and has a lot codes, May I ask you to take some time to review ?

    Here is the main changes. 
    
    1. implement mulitply variable scope
    2. inherit parent scope when job is created
    3. introduce local scope
    4. modify job complete function  to support variable scope propagation
    5. remove embed processInfo from activieJob
    6. put input variable mapping into local scope
    
  • support for backwards

    support for backwards

    Do we have any plan to support backwards ?

    Problem: Assume that we allow user to repay the order instead of creating a new order when user choose to refund before confirm-receipt, it can handle confirm-recepit event and go to send-bill again. But it can't handle the next flow becasue of some event had already trigged. I can't clear or reset the processInfo either.

    The order repay flow may sound weird, but it's common for me to desigin flows like that.

    I'm trying to design a workflow that user can handle an event then supervisor recheck it. If the event handled before has some wrong, the supervisor can turn the flow to previous flow again. so that the previous user can handle it again until the supervisor recheck pass.

    At now, I can't archive this goal graceful without backwards support. Do you have some suggestions?

    image

  • change task handler to allow input and output parameter as in BPMN

    change task handler to allow input and output parameter as in BPMN

    bpmn service tasks can be configured with input and output parameters. currently, the engine can't handle such. thus, it would be cool to have this feature implemented

  • bpmnEngine.NewTaskHandler undefined

    bpmnEngine.NewTaskHandler undefined

    Im trying this library follow guide https://nitram509.github.io/lib-bpmn-engine/getting-started, it gave:

    ./main.go:18:13: bpmnEngine.NewTaskHandler undefined (type bpmn_engine.BpmnEngineState has no field or method NewTaskHandler)
    
  • add TaskDefinition Info for global service task handler

    add TaskDefinition Info for global service task handler

    i am try to use TaskDefinition info for automatic match grpc job service. I want to replace AddTaskHandler to job service. I think id map is not enough.

  • How to implement user task?

    How to implement user task?

    I'm exploring user task function, there is example at https://github.com/nitram509/lib-bpmn-engine/blob/main/docs/examples/pause_user_tasks/pause_user_tasks.go however, I can't understand how to implement it, support the workflow shall pause user task step, waiting further instruction right? Is there any better example?

  • gopher art/logo for lib-bpmn-engine (similar like golang gopher)

    gopher art/logo for lib-bpmn-engine (similar like golang gopher)

    motivation

    It would be cool to have a Gopher like art/logo for this library, to strengthen the community :)

    • [x] a logo, similar like (google for images, with keyword: ) golang gopher
    • [x] SVG preferred
    • [x] PNG files in various common logo/thumbnail sizes would be cool to have
    • [ ] an additional banner would be awesome
  • findIntermediateCatchEventsForContinuation always hold the last events

    findIntermediateCatchEventsForContinuation always hold the last events

    findIntermediateCatchEventsForContinuation seems can't handle mulit events, it alwasy catch the last events when iterating over process.definitions.Process.IntermediateCatchEvent.

    code line: https://github.com/nitram509/lib-bpmn-engine/blob/3dc589633b8b74342b32a95c37c97840c19d7af7/pkg/bpmn_engine/engine.go#L203

    I'd like to push a pull requet if possible.

  • Namespace multiple workflows

    Namespace multiple workflows

    Add a resourceName parameter to methods of the BPMN Engine. Existing states renamed to BpmnEngineNamedResourceState and retain the same functionality. New state stores BpmnEngineNamedResourceStates in a map, and the methods use the resourceName parameter to update the appropriate BpmnEngineNamedResourceState for a given operation.

    Works towards https://github.com/nitram509/lib-bpmn-engine/issues/1. Keen to adjust approach to suit overall project objectives if I've misinterpreted anything.

  • Persist Paused Process

    Persist Paused Process

    Hi,

    I am interested to take a challenge persisting the Process to DB. What's the best approach that should I take?

    1. Persisting in JSON
    2. Persisting in Binary using Gob
    3. Others

    Also mentioned in:

    • https://github.com/nitram509/lib-bpmn-engine/issues/32#issuecomment-1235500250

    And what is the storage preferences? I can do the persistence in Redis / SQLite for starter, later can be MySQL / Postgres, etc

    Thank you.

  • improve documentation for supported elements

    improve documentation for supported elements

    motivation

    the bullet items of supported elements is quite compact and not easy to digest for beginners. so, the main idea is to improve documentation for beginners

    acceptance criteria

    • [x] pictures/symbols for each elements are shown
    • [x] short element description is available
    • [x] relevant caveats (compared to other engines) are described
  • fix data house keeping / cleanup

    fix data house keeping / cleanup

    motivation

    Internal data structures (slices, maps, etc) do grow over time and occupy memory. Hence, all objects shall be removed, once no more needed.

  • Rework engine-name to be optional

    Rework engine-name to be optional

    motivation

    the name of the engine should be optional

    hint: engine instances are supposed to have a name, to differentiate multiple instances - e.g. during logging.

    acceptance criteria

    • [ ] the name for the bpmn engine is optional, means an engine can be created straight, without providing a name
    • [ ] a default name per engine is created, when no explicit name is provided
  • improve test coverate

    improve test coverate

    There are some technical checks about the consistency of the BPMN/XML file. They are commented out because no tests cover these scenarios. Tests should be created and code can be re-activated.

    See https://github.com/nitram509/lib-bpmn-engine/blob/0c53af867c85a437e9561eecb66cc9b87df7064c/pkg/bpmn_engine/engine.go#L162

  • improve error handling handleIntermediateTimerCatchEvent()

    improve error handling handleIntermediateTimerCatchEvent()

    Propagate errors, so that users/developers can detect/handle errors.

    See todo:

    https://github.com/nitram509/lib-bpmn-engine/blob/0c53af867c85a437e9561eecb66cc9b87df7064c/pkg/bpmn_engine/engine_timer.go#L36

  • support FEEL expression language (BPMN standard)

    support FEEL expression language (BPMN standard)

    motivation

    Implementing FEEL (Friendly Enough Expression Language; one part of the DMN specification) would be a great step towards compatibility with other BPMN runtimes. The current 'expr' language has known differences (see also #18).

    The FEEL language is designed to write expressions for decision tables and literal expressions in a way that is easily understood by business professionals and developers.

    Ideally, this FEEL implementation is not part of the engine, but rather an individual project.

F' - A flight software and embedded systems framework

F´ (F Prime) is a component-driven framework that enables rapid development and deployment of spaceflight and other embedded software applications.

Jan 4, 2023
Embedded, self-hosted swagger-ui for go servers

swaggerui Embedded, self-hosted Swagger Ui for go servers This module provides swaggerui.Handler, which you can use to serve an embedded copy of Swagg

Dec 31, 2022
Embedded javascript server-side renderer for Golang

v8ssr Embedded javascript server-side renderer for Golang. Useful for static server-side rendering. This does not attempt to polyfill node or browser

Aug 27, 2022
Program to generate ruins using the Numenera Ruin Mapping Engine

Ruin Generator This is my attempt to build a program to generate ruins for Numenera using the rules from the Jade Colossus splatbook. The output only

Nov 7, 2021
A simple Cron library for go that can execute closures or functions at varying intervals, from once a second to once a year on a specific date and time. Primarily for web applications and long running daemons.

Cron.go This is a simple library to handle scheduled tasks. Tasks can be run in a minimum delay of once a second--for which Cron isn't actually design

Dec 17, 2022
Self hosted search engine for data leaks and password dumps
Self hosted search engine for data leaks and password dumps

Self hosted search engine for data leaks and password dumps. Upload and parse multiple files, then quickly search through all stored items with the power of Elasticsearch.

Aug 2, 2021
An easy way to add useful startup banners into your Go applications
An easy way to add useful startup banners into your Go applications

Try browsing the code on Sourcegraph! Banner Add beautiful banners into your Go applications Table of Contents Motivation Usage API Command line flags

Jan 1, 2023
An easy to use, extensible health check library for Go applications.

Try browsing the code on Sourcegraph! Go Health Check An easy to use, extensible health check library for Go applications. Table of Contents Example M

Dec 30, 2022
A simple wrapper to daemonize Go applications.

daemonigo A simple library to daemonize Go programming language applications. Installing $ go get github.com/tyranron/daemonigo After this command da

Jul 15, 2022
Prometheus instrumentation library for Go applications

Prometheus Go client library This is the Go client library for Prometheus. It has two separate parts, one for instrumenting application code, and one

Jan 3, 2023
Enable your Golang applications to self update with S3

s3update Enable your Golang applications to self update with S3. Requires Go 1.8+ This package enables our internal tools to be updated when new commi

Jul 20, 2022
A simple package to daemonize Go applications.

A simple package to daemonize Go applications.

Nov 13, 2021
Chaosblade executor for chaos experiments on Java applications
Chaosblade executor for chaos experiments on Java applications

Chaosblade-exec-jvm: Chaosblade executor for chaos experiments on Java applications Introduction The project is a chaosblade executor based on jvm-san

Dec 16, 2022
community search engine

Lieu an alternative search engine Created in response to the environs of apathy concerning the use of hypertext search and discovery.

Dec 24, 2022
Weaviate is a cloud-native, modular, real-time vector search engine
Weaviate is a cloud-native, modular, real-time vector search engine

Weaviate is a cloud-native, real-time vector search engine (aka neural search engine or deep search engine). There are modules for specific use cases such as semantic search, plugins to integrate Weaviate in any application of your choice, and a console to visualize your data.

Jan 5, 2023
IBus Engine for GoVarnam. An easy way to type Indian languages on GNU/Linux systems.

IBus Engine For GoVarnam An easy way to type Indian languages on GNU/Linux systems. goibus - golang implementation of libibus Thanks to sarim and haun

Feb 10, 2022
An experimental vulkan 3d engine for linux (raspberry 4)

protomatter an experimental vulkan 3d engine for linux (raspberry 4).

Nov 14, 2021
Rule engine implementation in Golang
Rule engine implementation in Golang

Rule engine implementation in Golang

Dec 30, 2022
A search engine for XKCD

xkcd_searchtool a search engine for XKCD What is it? This tool can crawling the comic transcripts from XKCD.com Users can search a comic using key wor

Sep 29, 2021