{"id":44972325,"url":"https://github.com/gini-modules/bpm2","last_synced_at":"2026-02-18T16:03:31.733Z","repository":{"id":79965528,"uuid":"69775901","full_name":"gini-modules/bpm2","owner":"gini-modules","description":"Gini BPM 业务流抽象层","archived":false,"fork":false,"pushed_at":"2024-02-27T03:47:04.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-02-27T04:39:51.289Z","etag":null,"topics":["bpm"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/gini-modules.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}},"created_at":"2016-10-02T02:59:50.000Z","updated_at":"2024-01-18T10:34:12.000Z","dependencies_parsed_at":"2024-02-27T04:45:21.768Z","dependency_job_id":null,"html_url":"https://github.com/gini-modules/bpm2","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/gini-modules/bpm2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gini-modules%2Fbpm2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gini-modules%2Fbpm2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gini-modules%2Fbpm2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gini-modules%2Fbpm2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gini-modules","download_url":"https://codeload.github.com/gini-modules/bpm2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gini-modules%2Fbpm2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29585441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T13:56:48.962Z","status":"ssl_error","status_checked_at":"2026-02-18T13:54:34.145Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["bpm"],"created_at":"2026-02-18T16:03:31.025Z","updated_at":"2026-02-18T16:03:31.728Z","avatar_url":"https://github.com/gini-modules.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gini BPM\n旨在提供一个BPM工作流引擎的抽象层, 同时提供一些命令行工具\n\n### 基础操作\n##### 程序\n```php\n$engine = \\Gini\\BPM\\Engine::of('camunda');\n$instance1 = $engine-\u003eprocess('invoice')-\u003estart(['refNo'=\u003e'01923019283']);\n$instance2 = $engine-\u003eprocessInstance($instance1-\u003eid); // 'd1085971-882d-11e6-819e-0242ac112a06'\nif ($instance-\u003eexists()) {\n}\n```\n\n##### 命令行\n```bash\ngini bpm deployment create bpm=camunda test.bpmn\ngini bpm process start bpm=camunda key=testProcess foo=bar\n```\n\n### 操作任务\n##### 程序\n```php\n//search tasks\n$o = $engine-\u003esearchTasks(['process'=\u003e'order-review', 'group' =\u003e 'school-of-chemistry']);\n$tasks = $engine-\u003egetTasks($o-\u003etoken, 0, 10);\n\n//get a task\n$task = $engine-\u003etask('1234-5678-9012');\n$task-\u003esetAssignee('jia.huang');\n$task-\u003eclaim('jia.huang');\n$task-\u003eunclaim();\n\n//complete a task\n$task-\u003ecomplete(['foo'=\u003e'bar']);\n\n//add a comment for a task\n$task-\u003eaddComment('comment');\n\n//get comments for a task\n$task-\u003egetComments()\n```\n\n##### 命令行\n```bash\ngini bpm task search bpm=camunda process=testProcess assignee=jia.huang\ngini bpm task search bpm=camunda process=testProcess group=school-of-chemistry\ngini bpm task complete bpm=camunda id=4d7f09c9-17ff-11e7-a73c-0242ac112a08 foo=bar\ngini bpm task assign bpm=camunda id=4d7f09c9-17ff-11e7-a73c-0242ac112a08 to=jia.huang\ngini bpm task claim bpm=camunda id=4d7f09c9-17ff-11e7-a73c-0242ac112a08 by=jia.huang\ngini bpm task unclaim bpm=camunda id=4d7f09c9-17ff-11e7-a73c-0242ac112a08\n```\n\n###操作组\n##### 程序\n```php\n//search groups\n$o = $engine-\u003esearchGroups(['type' =\u003e 'order-review-process']);\n$groups = $engine-\u003egetGroups($o-\u003etoken);\n\n//create a group\n$engine-\u003egroup()-\u003ecreate(['id' =\u003e 'school-of-chemistry', 'name' =\u003e '化工学院', type =\u003e 'order-review-process']);\n\n//get group by ID\n$group = $engine-\u003egroup('school-of-chemistry');\n\n//update group\n$group-\u003eupdate(['id' =\u003e 'school-of-chemistry', 'name' =\u003e '化工学院', type =\u003e 'order-review-process']);\n\n//delete group\n$group-\u003edelete();\n\n//get group's members\n$group-\u003egetMembers();\n\n//add a member to the group\n$group-\u003eaddMember('user_id');\n\n//remove a member from a group\n$group-\u003eremoveMember('user_id');\n```\n\n###操作用户\n##### 程序\n```php\n//search users\n$o = $engine-\u003esearchUsers(['name' =\u003e 'Demo']);\n$users = $engine-\u003egetUsers($o-\u003etoken);\n\n//create a user\n$engine-\u003euser()-\u003ecreate(['id' =\u003e 1, 'firstName' =\u003e 'demo', 'lastName' =\u003e 'Genee', 'email' =\u003e 'demo@geneegroup.com', 'password' =\u003e 'password']);\n\n//get user by ID\n$user = $engine-\u003euser(1);\n\n//update user\n$user-\u003eupdate(['id' =\u003e 1, 'firstName' =\u003e 'demo', 'lastName' =\u003e 'Genee', 'email' =\u003e 'demo@geneegroup.com']);\n\n//delete user\n$user-\u003edelete();\n\n//change user's password\n$user-\u003echangePassword('password', 'newpassword');\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgini-modules%2Fbpm2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgini-modules%2Fbpm2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgini-modules%2Fbpm2/lists"}