{"id":34160913,"url":"https://github.com/olive-io/bpmn","last_synced_at":"2026-02-26T10:57:02.817Z","repository":{"id":191784150,"uuid":"685387680","full_name":"olive-io/bpmn","owner":"olive-io","description":"a lightweight bpmn workflow engine","archived":false,"fork":false,"pushed_at":"2025-11-07T08:32:09.000Z","size":3633,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-12-18T03:37:21.900Z","etag":null,"topics":["activity","bpmn","bpmn2","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olive-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-08-31T05:48:06.000Z","updated_at":"2025-12-09T20:38:17.000Z","dependencies_parsed_at":"2023-12-15T04:32:26.433Z","dependency_job_id":"933afa3a-cbce-4cc8-a5d5-9eda12648d12","html_url":"https://github.com/olive-io/bpmn","commit_stats":null,"previous_names":["olive-io/bpmn"],"tags_count":94,"template":false,"template_full_name":null,"purl":"pkg:github/olive-io/bpmn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olive-io%2Fbpmn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olive-io%2Fbpmn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olive-io%2Fbpmn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olive-io%2Fbpmn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olive-io","download_url":"https://codeload.github.com/olive-io/bpmn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olive-io%2Fbpmn/sbom","scorecard":{"id":705089,"data":{"date":"2025-08-11","repo":{"name":"github.com/olive-io/bpmn","commit":"e3f9648cdf4b5c578cc135c0248ea6117526db69"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"19 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yml:14","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/olive-io/bpmn/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/olive-io/bpmn/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/olive-io/bpmn/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/olive-io/bpmn/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/olive-io/bpmn/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/olive-io/bpmn/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/olive-io/bpmn/release.yml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/main.yml:25","Warn: goCommand not pinned by hash: .github/workflows/release.yml:27","Warn: goCommand not pinned by hash: .github/workflows/release.yml:38","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   1 out of   4 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T06:19:34.712Z","repository_id":191784150,"created_at":"2025-08-22T06:19:34.713Z","updated_at":"2025-08-22T06:19:34.713Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29856776,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T08:51:08.701Z","status":"ssl_error","status_checked_at":"2026-02-26T08:50:19.607Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activity","bpmn","bpmn2","golang"],"created_at":"2025-12-15T08:46:23.960Z","updated_at":"2026-02-26T10:57:02.789Z","avatar_url":"https://github.com/olive-io.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Introduce | [中文](https://github.com/olive-io/bpmn/tree/main/README_ZH.md)\n\n**Lightweight BPMN 2.0 workflow engine written in Go**\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/olive-io/bpmn.svg)](https://pkg.go.dev/github.com/olive-io/bpmn)\n[![License: Apache-2.0](https://img.shields.io/badge/license-Apache-blue.svg)](LICENSE.md)\n[![Build Status](https://github.com/olive-io/bpmn/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/olive-io/bpmn/actions/workflows/main.yml?query=branch%3Amain)\n[![Last Commit](https://img.shields.io/github/last-commit/olive-io/bpmn)](https://github.com/olive-io/bpmn/commits/main)\n\n---\n\n## What Is This?\n\n`github.com/olive-io/bpmn` is an embeddable BPMN 2.0 runtime for Go applications.\n\nUse it when you want to:\n\n- Execute BPMN process definitions inside your Go service.\n- Handle user/service/script tasks with your own business logic.\n- Track process runtime via trace streams for debugging and observability.\n\nIt includes two modules:\n\n- Runtime module: `github.com/olive-io/bpmn/v2`\n- BPMN schema module: `github.com/olive-io/bpmn/schema`\n\n---\n\n## Installation\n\n```bash\ngo get -u github.com/olive-io/bpmn/schema\ngo get -u github.com/olive-io/bpmn/v2\n```\n\n---\n\n## Quick Start\n\nThis example loads a BPMN file, starts a process, handles task traces, and waits for completion.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/olive-io/bpmn/schema\"\n\t\"github.com/olive-io/bpmn/v2\"\n\t\"github.com/olive-io/bpmn/v2/pkg/tracing\"\n)\n\nfunc main() {\n\tdata, err := os.ReadFile(\"task.bpmn\")\n\tif err != nil {\n\t\tlog.Fatalf(\"read bpmn file: %v\", err)\n\t}\n\n\tdefinitions, err := schema.Parse(data)\n\tif err != nil {\n\t\tlog.Fatalf(\"parse bpmn xml: %v\", err)\n\t}\n\n\tengine := bpmn.NewEngine()\n\tctx := context.Background()\n\n\tproc, err := engine.NewProcess(definitions,\n\t\tbpmn.WithVariables(map[string]any{\"customer\": \"alice\"}),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"create process: %v\", err)\n\t}\n\n\ttraces := proc.Tracer().Subscribe()\n\tdefer proc.Tracer().Unsubscribe(traces)\n\n\tif err := proc.StartAll(ctx); err != nil {\n\t\tlog.Fatalf(\"start process: %v\", err)\n\t}\n\n\tgo func() {\n\t\tfor trace := range traces {\n\t\t\ttrace = tracing.Unwrap(trace)\n\t\t\tswitch t := trace.(type) {\n\t\t\tcase bpmn.TaskTrace:\n\t\t\t\t// Complete user/service/script task with results.\n\t\t\t\tt.Do(bpmn.DoWithResults(map[string]any{\"approved\": true}))\n\t\t\tcase bpmn.ErrorTrace:\n\t\t\t\tlog.Printf(\"process error: %v\", t.Error)\n\t\t\t}\n\t\t}\n\t}()\n\n\tif ok := proc.WaitUntilComplete(ctx); !ok {\n\t\tlog.Printf(\"process cancelled\")\n\t}\n\n\tlog.Printf(\"variables: %#v\", proc.Locator().CloneVariables())\n}\n```\n\n---\n\n## Core Concepts\n\n- `Engine`: creates process instances from BPMN definitions.\n- `Process`: executes one executable process.\n- `ProcessSet`: executes multiple executable processes in one definition.\n- `Tracer`: runtime event stream; all traces are accessible via subscribe/unsubscribe.\n- `TaskTrace`: callback point to provide task result, data objects, headers, and errors.\n\n---\n\n## Single Process vs Process Set\n\nUse `NewProcess` when your BPMN definitions contain exactly one executable process.\n\nUse `NewProcessSet` when definitions contain multiple executable processes.\n\n```go\nproc, err := engine.NewProcess(definitions)\n// Returns an error if multiple executable processes are present.\n\nset, err := engine.NewProcessSet(\u0026definitions)\n// Runs all executable processes in the same definitions.\n```\n\n---\n\n## Observability and Runtime Errors\n\nSubscribe tracer events to inspect runtime behavior:\n\n- `FlowTrace`: sequence flow transitions.\n- `TaskTrace`: task is waiting for external decision/result.\n- `ErrorTrace`: runtime error happened.\n- `CeaseFlowTrace` / `CeaseProcessSetTrace`: process or process set completed.\n\nID generator fallback behavior:\n\n- Runtime attempts to initialize the default SNO-based ID generator.\n- If initialization fails, runtime falls back to a local generator.\n- A warning trace is emitted to make this visible in observability pipelines.\n\n---\n\n## BPMN Coverage\n\nThis engine supports core BPMN elements used by most service workflows, including:\n\n- Tasks: User, Service, Script, Manual, Business Rule, Call Activity.\n- Events: Start, End, Intermediate Catch/Throw, Timer-related flows.\n- Gateways: Exclusive, Inclusive, Parallel, Event-based.\n- Sub-processes and sequence flows.\n\nFor concrete usage patterns, see examples and tests in this repository.\n\n---\n\n## Development Commands\n\nFrom repository root:\n\n```bash\n# all runtime tests\ngo test -v ./...\n\n# schema module tests\ngo test -v ./schema\n\n# static analysis\ngo vet ./...\n\n# run one test by name\ngo test -v ./... -run 'TestUserTask'\n\n# run one test in a package, bypass cache\ngo test -v ./pkg/data -run '^TestContainer$' -count=1\n```\n\n---\n\n## Examples\n\n- [quickstart](https://github.com/olive-io/bpmn/tree/main/examples/readme_quickstart)\n- [basic](https://github.com/olive-io/bpmn/tree/main/examples/basic)\n- [user_task](https://github.com/olive-io/bpmn/tree/main/examples/user_task)\n- [gateway](https://github.com/olive-io/bpmn/tree/main/examples/gateway)\n- [gateway_expr](https://github.com/olive-io/bpmn/tree/main/examples/gateway_expr)\n- [properties](https://github.com/olive-io/bpmn/tree/main/examples/properties)\n- [catch_event](https://github.com/olive-io/bpmn/tree/main/examples/catch_event)\n- [collaboration](https://github.com/olive-io/bpmn/tree/main/examples/collaboration)\n- [subprocess](https://github.com/olive-io/bpmn/tree/main/examples/subprocess)\n- [multiprocess](https://github.com/olive-io/bpmn/tree/main/examples/multiprocess)\n\n---\n\n## Contributing\n\nPRs are welcome. For contributor/agent workflow guidance, see `AGENTS.md`.\n\n---\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folive-io%2Fbpmn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folive-io%2Fbpmn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folive-io%2Fbpmn/lists"}