{"id":50546808,"url":"https://github.com/nativebpm/nativebpm","last_synced_at":"2026-06-04T00:00:31.208Z","repository":{"id":362347792,"uuid":"1258587845","full_name":"nativebpm/nativebpm","owner":"nativebpm","description":null,"archived":false,"fork":false,"pushed_at":"2026-06-03T19:26:56.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T21:11:31.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nativebpm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":null,"dco":null,"cla":null}},"created_at":"2026-06-03T18:13:37.000Z","updated_at":"2026-06-03T19:26:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nativebpm/nativebpm","commit_stats":null,"previous_names":["nativebpm/nativebpm"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nativebpm/nativebpm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativebpm%2Fnativebpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativebpm%2Fnativebpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativebpm%2Fnativebpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativebpm%2Fnativebpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nativebpm","download_url":"https://codeload.github.com/nativebpm/nativebpm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nativebpm%2Fnativebpm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33884734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-04T00:00:20.545Z","updated_at":"2026-06-04T00:00:31.198Z","avatar_url":"https://github.com/nativebpm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NativeBPM Go SDK Client\n\nThe official Go SDK client for interacting with the closed-source `nativebpm` engine.\n\n---\n\n## Installation\n\nAdd the SDK dependency to your `go.mod`:\n\n```bash\ngo get github.com/nativebpm/nativebpm\n```\n\n---\n\n## Quick Start (Fluent API)\n\nBelow is a complete example demonstrating client initialization, process deployment, starting a new process instance, and completing user tasks using the Fluent API builders.\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/nativebpm/nativebpm\"\n)\n\nfunc main() {\n\tlogger := slog.Default()\n\tctx := context.Background()\n\n\t// 1. Initialize SDK Client\n\tclient, err := nativebpm.NewClient(\"http://localhost:8080\")\n\tif err != nil {\n\t\tlogger.Error(\"Failed to initialize NativeBPM client\", \"error\", err)\n\t\treturn\n\t}\n\n\t// 2. Upload/Deploy BPMN Process Definition (Fluent API)\n\txmlData, err := os.ReadFile(\"process.bpmn\")\n\tif err != nil {\n\t\tlogger.Error(\"Failed to read BPMN file\", \"error\", err)\n\t\treturn\n\t}\n\n\tdeployResp, err := client.Deploy(\"loanApproval\", \"Loan Approval\").\n\t\tXML(xmlData).\n\t\tSend(ctx)\n\tif err != nil {\n\t\tlogger.Error(\"Failed to deploy process schema\", \"error\", err)\n\t\treturn\n\t}\n\tlogger.Info(\"Process deployed successfully\", \"processID\", deployResp.ProcessID)\n\n\t// 3. Start a new Process Instance (Fluent API)\n\tpi, err := client.StartProcessInstance(\"loanApproval\").\n\t\tInstanceID(\"da8b3d68-0eb4-44df-be9e-f00140280eb4\").\n\t\tVariable(\"amount\", 25000).\n\t\tVariable(\"user\", \"john_doe\").\n\t\tSend(ctx)\n\tif err != nil {\n\t\tlogger.Error(\"Failed to start process instance\", \"error\", err)\n\t\treturn\n\t}\n\tlogger.Info(\"Process instance started\", \"instanceID\", pi.ID, \"waitingTasks\", pi.WaitingTokens)\n\n\t// 4. Complete User Task / Wait State (Fluent API)\n\tpi, err = client.CompleteTask(pi.ID, \"taskApprove\").\n\t\tVariable(\"approved\", true).\n\t\tSend(ctx)\n\tif err != nil {\n\t\tlogger.Error(\"Failed to complete task\", \"error\", err)\n\t\treturn\n\t}\n\tlogger.Info(\"Task completed\", \"isCompleted\", pi.Completed)\n\n\t// 5. Query Audit Logs\n\tlogs, err := client.GetInstanceLogs(ctx, \"da8b3d68-0eb4-44df-be9e-f00140280eb4\")\n\tif err != nil {\n\t\tlogger.Error(\"Failed to get logs\", \"error\", err)\n\t\treturn\n\t}\n\tfor _, l := range logs {\n\t\tlogger.Info(\"Audit Log\", \"nodeID\", l.NodeID, \"nodeName\", l.NodeName, \"action\", l.Action)\n\t}\n}\n```\n\n---\n\n## API Capabilities\n\nThe SDK client provides builder pattern methods (Fluent API) for action requests, and direct methods for simple queries:\n\n| SDK Method | HTTP REST Target | Description |\n|:---|:---|:---|\n| `client.Deploy(id, name).XML(xml).Send(ctx)` | `POST /api/deploy` | Uploads and deploys process schema. |\n| `client.StartProcessInstance(procID).InstanceID(id).Variable(k,v).Send(ctx)` | `POST /api/definitions/{id}/start` | Starts a new process instance. |\n| `client.CompleteTask(instID, nodeID).Variable(k,v).Send(ctx)` | `POST /api/instances/{id}/complete` | Advances wait state by completing a task. |\n| `client.ListDefinitions(ctx)` | `GET /api/definitions` | Lists all active process definitions. |\n| `client.ListInstances(ctx)` | `GET /api/instances` | Lists all execution instance records. |\n| `client.GetInstance(ctx, id)` | `GET /api/instances/{id}` | Fetches active state metadata. |\n| `client.GetInstanceLogs(ctx, id)` | `GET /api/instances/{id}/logs` | Retrieves audit trail log events. |\n\n---\n\n## Runnable Examples\n\nFor complete, ready-to-run examples and benchmarks, check out the **[examples](file:///Users/user/github.com/nativebpm/nativebpm/examples)** directory:\n\n*   **[Simple Example](file:///Users/user/github.com/nativebpm/nativebpm/examples/simple)**: Demonstrates process deployment, instance startup, task completion, and audit log query using a simple User Task process.\n*   **[Complex Example](file:///Users/user/github.com/nativebpm/nativebpm/examples/complex)**: Explains exclusive gateway branching (`XOR`) with conditions evaluating active workflow routing.\n*   **[Load Testing](file:///Users/user/github.com/nativebpm/nativebpm/examples/loadtest)**: High-concurrency performance benchmark demonstrating execution throughputs up to **750+ RPS** against the optimized PostgreSQL backend.\n*   **[Hybrid Camunda Bridge](file:///Users/user/github.com/nativebpm/nativebpm/examples/hybrid-camunda)**: Adapts an external Camunda engine with the NativeBPM platform to delegate task execution.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativebpm%2Fnativebpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativebpm%2Fnativebpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativebpm%2Fnativebpm/lists"}