承接 bingo-soft/bpmn 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bingo-soft/bpmn

Composer 安装命令:

composer create-project bingo-soft/bpmn

包简介

Bpmn model used in workflow engine

README 文档

README

Latest Stable Version Minimum PHP Version License: MIT Scrutinizer Code Quality

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-02