StarFlow 工作流 5種設定參與者的模式

2021-08-30 10:05:03 字數 3125 閱讀 2882

5中設定環節參與者模式:

1:配置流程是設定固定參與者

2:與流程啟動者相同

3:a環節的參與者保持與b環節參與者相同

4:提供乙個介面。動態獲取參與者

下面的例項提供四種實現方式:

流程圖:

例項**

processengine processengine = new configuration().buildprocessengine();

iprocessdefineservice procdefservice = processengine.getprocessdefineservice();

iprocessinstanceservice procinstservice = processengine.getprocessinstanceservice();

iworkitemservice workitemservice = processengine.getworkitemservice();

//部署流程

procdefservice.deployprocessfile("flow1.xml");

//新增filter

processengine.addfilter(new loggerprocessfilter());

// //啟動流程

// processinstance processinstance = procinstservice.createprocess("testflow1", "100002");

// //建立流程

// procinstservice.startprocess(processinstance.getprocessinstid());

procinstservice.createandstartprocess("testflow1", "100002");

//listworkitems = workitemservice.querypersonworkitems("100002");

//環節定義id, 使用者id

workitemservice.finishworkitem(1, "100001"); //申告

workitemservice.finishworkitem(2, "910150"); //派單

workitemservice.finishworkitem(3, "100002"); //處理

workitemservice.finishworkitem(4, "910115"); //歸檔

執行過程日誌:

2010-1-12 18:23:14 com.starit.wf.service.filter.loggerprocessfilter processcreate

資訊: 流程【testflow1】建立成功, 流程例項id = 1

2010-1-12 18:23:14 com.starit.wf.service.filter.loggerprocessfilter processstart

資訊: 流程【testflow1】啟動成功, 流程例項id = 1

2010-1-12 18:23:14 com.starit.wf.service.filter.loggerprocessfilter acitivitystart

資訊: 環節【上報】建立成功, 環節例項id = 2

2010-1-12 18:23:14 com.starit.wf.service.filter.loggerprocessfilter acitivitycomplete

資訊: 環節【上報】執行完成, 環節例項id = 2

2010-1-12 18:23:14 com.starit.wf.service.filter.loggerprocessfilter acitivitystart

資訊: 環節【派單】建立成功, 環節例項id = 3

2010-1-12 18:23:15 com.starit.wf.service.filter.loggerprocessfilter acitivitycomplete

資訊: 環節【派單】執行完成, 環節例項id = 3

2010-1-12 18:23:15 com.starit.wf.service.filter.loggerprocessfilter acitivitystart

資訊: 環節【處理】建立成功, 環節例項id = 4

2010-1-12 18:23:15 com.starit.wf.service.filter.loggerprocessfilter acitivitycomplete

資訊: 環節【處理】執行完成, 環節例項id = 4

2010-1-12 18:23:15 com.starit.wf.service.filter.loggerprocessfilter acitivitystart

資訊: 環節【歸檔】建立成功, 環節例項id = 5

2010-1-12 18:23:15 com.starit.wf.service.filter.loggerprocessfilter acitivitycomplete

資訊: 環節【歸檔】執行完成, 環節例項id = 5

2010-1-12 18:23:15 com.starit.wf.service.filter.loggerprocessfilter processcomplete

資訊: 流程【testflow1】執行完成, 流程例項id = 1

流程定義內容

<?xml version="1.0" encoding="utf-8"?>

1440

xor60

xorxor

single

process-starter

60xorxor

single

default

60xorxor

single

act-logic

com.starit.test.testparticipantservice

60xorxor

single

act-executer

a02 xor

true

true

true

true

true

StarFlow 工作流 環節三種分支模式

starflow 支援三種環節分支模式 1 單一分支 2 多路分支 3 全部分支 設計過程中分支模式比較容易實現。同時在這過程,考慮環節匯聚模式,如果考慮比較全面的話,實現起來困難還是不小,慢慢磨料,哈哈!例項流程圖 多路分支例項 processengine processengine new co...

工作流建模 工作流概念

工作流建模 工作流概念 1 案例 工作流系統得基本目的是處理案例。每個案例都有乙個唯一標識,而且每個案例的生命週期都是有限的。案例生命週期都處於某個特定狀態,該狀態由三個元素組成 1 案例相關的屬性的值 案例屬性是一系列同案例相關的變數。能夠用來管理案例。正是通過這些變數,才有可能指出在特定條件下某...

工作流簡介及其6種常用的工作流引擎

先說說四個非petrinet排程演算法的開源引擎.4 obe的引擎排程機制.4 shark的引擎排程機制.5 osworkflow的引擎執行機制.6 jbpm的引擎執行機制.6 再說說兩個petrinet排程演算法的開源引擎.9 yawl的引擎排程機制.10 bossa的引擎排程機制 標準的pn機 ...