Shark工作流的实现和WMFC&OMG规范的对比
-----第七部分:工作流信息和业务信息如何建立连接
XML:namespace prefix = o ns = "urn:schemas-microsoft-com:Office:office" />
关键字:Shark 工作流 WMFC OMG 规范
工作流实例化后就需要把具体的活动和业务过程连接起来,如果是用户交互的活动,还需要指定与这个活动相关的界面。
这一部分的工作是具体实现的内容,WMFC规范没有提及。
下面我们看看jbpm的做法:jbpm-1.0-srcjbpm-1.0examplesprocessholidayprocessdefinition.xml
Jbpm并没有采用标准的xpdl工作流描述语言,具体如下:
<?xml version="1.0"?>
Holiday request
This process manages a planned absence of an employee.
ae
start a request for a holiday
requester
queue/A
ConnectionFactory
a holiday was requested from ${start date} to ${end date} with comment ${comment}
MailAction" on-exception="log">
previousActor
you requested a holiday
you requested a holiday from ${start date} to ${end date} with comment ${comment}
In this activity, You have to evaluate the holiday-request of your employee.
previousActor->group(hierarchy)->role(boss)
boss
name="evaluation" handler="org.jbpm.workflow.delegation.impl.decision.EvaluationDecision">
evaluation result
This is a notification of the refusal of your holiday request. By submitting this foRM you declare to have taken notice of the refusal.
requester
to="end" />
to="end" />
In this activity, You have to register that an employee is taking holiday.
role(boss)->group(hierarchy)->role(hr-responsible)
hr-responsible
to="join before finish" />
You get notified that your holiday request has been approved.
role(requester)
to="join before finish" />
如果熟悉struts的读者看到上面的描述会发现, to="join before finish" /> 这样的写法和struts配置文件中的页面跳转十分类似。
上面的写法非常直观,不过比较Shark的XPDL实现。推荐还是使用XPDL的流程描述。
XPDL 把jbpm中分散的跳转放到了一起:
但是jbpm的做法也有一个非常好的地方,就是把工作流程和业务系统建立了关系。
下文将具体的说说jbpm中做法的优点。
待续
田春峰
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10794571/viewspace-974656/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10794571/viewspace-974656/