bingo-soft/bpmn
Composer 安装命令:
composer create-project bingo-soft/bpmn
包简介
Bpmn model used in workflow engine
README 文档
README
bpmn
Bpmn model used in workflow engine
Installation
Install Bpmn, using Composer:
composer require bingo-soft/bpmn
Running tests
./vendor/bin/phpunit ./tests
Example 1
//create new invoice business process Bpmn::createProcess() ->executable() ->startEvent() ->name("Invoice received") ->formKey("embedded:app:forms/start-form.html") ->userTask() ->name("Assign Approver") ->formKey("embedded:app:forms/assign-approver.html") ->assignee("demo") ->userTask("approveInvoice") ->name("Approve Invoice") ->formKey("embedded:app:forms/approve-invoice.html") ->assignee('${approver}') ->exclusiveGateway() ->name("Invoice approved?") ->gatewayDirection("Diverging") ->condition("yes", '${approved}') ->userTask() ->name("Prepare Bank Transfer") ->formKey("embedded:app:forms/prepare-bank-transfer.html") ->candidateGroups("accounting") ->serviceTask() ->name("Archive Invoice") ->setClass("org.test.bpm.example.invoice.service.ArchiveInvoiceService") ->endEvent() ->name("Invoice processed") ->moveToLastGateway() ->condition("no", '${!approved}') ->userTask() ->name("Review Invoice") ->formKey("embedded:app:forms/review-invoice.html" ) ->assignee("demo") ->exclusiveGateway() ->name("Review successful?") ->gatewayDirection("Diverging") ->condition("no", '${!clarified}') ->endEvent() ->name("Invoice not processed") ->moveToLastGateway() ->condition("yes", '${clarified}') ->connectTo("approveInvoice") ->done();
Example 2
// Read business process from file $fd = fopen('test.bpmn', 'r+'); $modelInstance = Bpmn::readModelFromStream($fd);
统计信息
- 总下载量: 593
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-02