(10)Shark工作流的实现和WMFC&OMG规范的对比

Shark工作流的实现和WMFC&OMG规范的对比
-----第十部分:分析obe自带例子引擎的执行过程


关键字:Shark 工作流 WMFC OMG 规范


下面工作流执行的过程参见:-----第五部分:工作流流程的设计
下面是采用obe引擎执行第五部分定义的“辞职申请”的过程的日志。



[INFO]: Loading applications in package pkg

-1...

[INFO]: 0 applications loaded

org.obe.util.Duration [INFO]: Duration(0, null)




[INFO]: Created workflow process [id=wfp-1,name= 人员辞职流程]
[INFO]: Redefinable header not found
[INFO]: Created activity [id=提交辞职申请,name=提交辞职申请]

[INFO]: Loading extended attributes
[INFO]: Created activity [id=部门经理批准,name=部门经理批准]

[INFO]: Loading extended attributes


[INFO]: Created activity [id=总经理批准,name=总经理批准]

[INFO]: Loading extended attributes




[INFO]: Created activity [id= 部门经理复查,name=部门经理复查]
[INFO]: Loading extended attributes




[INFO]: Created activity [id= 财务审查,name=财务审查]
[INFO]: Loading extended attributes




[INFO]: Created activity [id= 人力资源审查,name=人力资源审查]
[INFO]: Loading extended attributes




[INFO]: 6 activities loaded
[INFO]: Loading transitions in process wfp-1...

[DEBUG]: Transition 3cb3f6d1-56c6-11d8-8fe6-8f02bbfa91d7 loop type: null

[INFO]: Loading extended attributes




[INFO]: 6 transitions loaded
[INFO]: Loading extended attributes

org.obe.util.Duration [INFO]: Duration(0, null)



[INFO]: Created workflow process [id=782fc727-56c6-11d8-8fe6-8f02bbfa91d7,name=财务审查]

org.obe.test.OBETest [INFO]: Executing workflow process pkg-1:wfp-1

org.obe.test.OBETest [INFO]: Executing synchronously

org.obe.engine.WorkflowEngine [INFO]: Created date: Wed Feb 04 11:54:55 CST 2004



org.obe.engine.WorkflowProcessInstance [INFO]: Starting process 1






org.obe.engine.WorkflowProcessInstance [INFO]: Start activity: 提交辞职申请
org.obe.engine.WorkflowProcessInstance [INFO]: Executing activity 提交辞职申请
org.obe.engine.WorkflowProcessInstance [INFO]: Executing incoming transitions fo

r 部门经理批准

org.obe.engine.WorkflowProcessInstance [INFO]: Executing activity 部门经理批准

org.obe.engine.WorkflowProcessInstance [DEBUG]: Transition loop type: NOLOOP

org.obe.engine.WorkflowProcessInstance [INFO]: Executing outgoing transitions fo

r 部门经理批准

org.obe.engine.WorkflowProcessInstance [DEBUG]: Looping through transition restr

ictions [size=0]

org.obe.engine.WorkflowProcessInstance [DEBUG]: 2 transitions, executing AND spl

it (default)

org.obe.engine.WorkflowProcessInstance [INFO]: findCurrentThreadReference(PID-1)



org.obe.engine.WorkflowProcessInstance [INFO]: Current thread: Thread[PID-1,5,ma

in]

org.obe.engine.WorkflowProcessInstance [INFO]: AND split; execute in new thread

org.obe.engine.WorkflowProcessInstance [INFO]: AND split; execute in new thread

org.obe.engine.WorkflowProcessInstance [INFO]: ThreadReference parent child coun

t: 2

org.obe.engine.WorkflowProcessInstance [INFO]: Workflow completed

org.obe.engine.WorkflowEngine [INFO]: Returning from executeSynch()

org.obe.engine.WorkflowProcessInstance [INFO]: Executing incoming transitions fo

r 财务审查

org.obe.engine.WorkflowProcessInstance [INFO]: Executing activity 财务审查

org.obe.engine.workitem.SubFlowWorkItem [INFO]: Executing sub flow in synchronou

s mode

org.obe.engine.WorkflowEngine [INFO]: Created date: Wed Feb 04 11:58:47 CST 2004



org.obe.engine.WorkflowProcessInstance [INFO]: Starting process 2

org.obe.engine.WorkflowProcessInstance [INFO]: Executing incoming transitions fo

r 人力资源审查

org.obe.engine.WorkflowProcessInstance [INFO]: Executing activity 人力资源审查

org.obe.engine.workitem.SubFlowWorkItem [INFO]: Executing sub flow in synchronou

s mode

org.obe.engine.WorkflowEngine [INFO]: Created date: Wed Feb 04 11:59:06 CST 2004



org.obe.engine.WorkflowProcessInstance [INFO]: Starting process 3

org.obe.engine.WorkflowProcessInstance [DEBUG]: Loading workflow relevant data f

rom package




org.obe.engine.WorkflowProcessInstance [DEBUG]: Loading workflow relevant data f
rom parameters

org.obe.engine.util.ContextUtilities [INFO]: Formal parameters size: 0

[DEBUG]:org.formproc.Form - Validating groups

org.obe.engine.WorkflowProcessInstance [INFO]: Returning from workflow process:

no activities

org.obe.engine.WorkflowEngine [INFO]: Returning from executeSynch()

org.obe.engine.WorkflowProcessInstance [DEBUG]: Transition loop type: NOLOOP

org.obe.engine.WorkflowProcessInstance [INFO]: Executing outgoing transitions fo

r 财务审查

org.obe.engine.WorkflowProcessInstance [DEBUG]: Looping through transition restr

ictions [size=0]

org.obe.engine.WorkflowProcessInstance [DEBUG]: Executing single outgoing transi

tion

org.obe.engine.WorkflowProcessInstance [INFO]: Executing incoming transitions fo

r 部门经理复查

org.obe.engine.WorkflowProcessInstance [INFO]: Executing activity 部门经理复查

org.obe.engine.WorkflowProcessInstance [INFO]: Executing loop: WHILE

org.obe.engine.WorkflowProcessInstance [DEBUG]: Loading workflow relevant data f

rom package




org.obe.engine.WorkflowProcessInstance [DEBUG]: Loading workflow relevant data f
rom parameters

org.obe.engine.util.ContextUtilities [INFO]: Formal parameters size: 0

[DEBUG]:org.formproc.Form - Validating groups

org.obe.engine.WorkflowProcessInstance [INFO]: Returning from workflow process:

no activities

org.obe.engine.WorkflowEngine [INFO]: Returning from executeSynch()

org.obe.engine.WorkflowProcessInstance [DEBUG]: Transition loop type: NOLOOP

org.obe.engine.WorkflowProcessInstance [INFO]: Executing outgoing transitions fo

r 人力资源审查

org.obe.engine.WorkflowProcessInstance [DEBUG]: Looping through transition restr

ictions [size=0]

org.obe.engine.WorkflowProcessInstance [DEBUG]: Executing single outgoing transi

tion

org.obe.engine.WorkflowProcessInstance [INFO]: Executing incoming transitions fo

r 部门经理复查

org.obe.engine.WorkflowProcessInstance [INFO]: Executing activity 部门经理复查

E:/my/workflow/doc/obetest-1.0b2/obetest-1.0b2>pause

请按任意键继续 . . .





从上面的执行可以看出:

org.obe.engine.WorkflowProcessInstance

org.obe.engine.WorkflowEngine

这两个类执行了关键的工作流程部分,是obe具体执行的主体部分。
org.obe.engine.WorkflowProcessInstance 中主要的方法包括:

1、startProcess

2、stopProcess

3、resumeProcess

4、pauseProcess



可见,obe中主要的工作是在WorkflowProcessInstance中执行的。

下文主要分析

org.obe.engine.WorkflowProcessInstance

org.obe.engine.WorkflowEngine

两个类的执行原理。



待续

田春峰

accesine@163.com





【(10)Shark工作流的实现和WMFC&OMG规范的对比】

    推荐阅读