(优质)(BPM业务流程管理)介绍

上传人:方*** 文档编号:138196843 上传时间:2020-07-14 格式:DOC 页数:27 大小:518.02KB
返回 下载 相关 举报
(优质)(BPM业务流程管理)介绍_第1页
第1页 / 共27页
(优质)(BPM业务流程管理)介绍_第2页
第2页 / 共27页
亲,该文档总共27页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《(优质)(BPM业务流程管理)介绍》由会员分享,可在线阅读,更多相关《(优质)(BPM业务流程管理)介绍(27页珍藏版)》请在金锄头文库上搜索。

1、(BPM业务流程管理)介绍窗体顶端jbpm5.1介绍(2)快速开始首先下载jBPM,http:/ bin:jBPM的二进制文件和它们的依赖包 src:核心模块的源码 gwt-console:jBPM的控制台,包括服务端和客户端 docs:文档 examples:一些jBPM的例子,可以导入到Eclipse installer:jBPM的安装,下载和安装一个jBPM的示例 installer-full:所有的包括demo,jar包等待的完整工程一些有用的链接 http:/planet.jboss.org/view/feed.seam?name=jbossjbpm http:/ http:/ind

2、ex.html?module=bb&op=viewforum&f=217 https:/issues.jboss.org/browse/JBPM https:/hudson.jboss.org/hudson/job/jBPM/源码jBPM的,现在使用它的源代码版本控制系统的git。可以在这里找到jBPM项目的来源(包括所有版本从jBPM5.0-CR1开始):https:/ 下载JBossAS 下载Eclipse JBoss的安装Drools的Guvnor 到JBossOryx安装设置 安装到JBossjBPM的控制台 安装jBPM的Eclipse插件 安装Drools的Eclipse插件如果你

3、想看到报告在jBPM控制台上,那么需要修改build.properties文件的jBPM.birt.download属性设置为trueantstart.demo启动示例 启动H2数据库 启动了JBossAS 启动Eclipse 启动人工任务服务使用Eclipsetools导入示例工程下的sample/evaluation导入之后可以看到工程中的示例程序双击打开Evaluation.bpmn可以运行ProcessTest进行测试使用jBPM控制台启动后输入如下链接http:/localhost:8080/jbpm-console使用krisv/krisv登录可以看到如下界面你可以启动一个新的流程

4、,查看一个正在运行的流程的实例的状态,查看你的任务,完成任务,监控流程的执行使用Guvnor仓库和设计作为一个过程库的Guvnor库可用于存储业务流程。它还提供了一个基于Web的界面来管理您的进程。输入如下地址可以进入http:/localhost:8080/drools-guvnor核心引擎API本节介绍的API,你需要加载过程并执行它们。对于如何界定的过程本身更详细,查看检出的BPMN2.0的章节。你可以在知识库中定义一个流程实例,然后在知识库中产生一个实例的session对象,如下图所示知识库可以共享会话之间,通常只创建一次,在启动应用程序。知识库可以动态改变(这样你就可以在运行过程中添

5、加或删除)。会话可以创建基于一个知识库,用于执行过程,并与引擎交互。你想创建一个会话被认为是相对较轻的,你可以创造尽可能多的独立会议。如何创建许多会议是由你。在一般情况下,最简单的情况下开始创建一个会话,然后在您的应用程序的各个地方。你可以决定创建多个会话,例如,如果你想有多个独立的处理单元(例如,你想要的所有进程,从一个客户的完全独立于另一个客户的过程,使您可以创建一个为每个客户独立会议),或如果你需要多个会话,可扩展性的原因。如果你不知道做什么,只要简单地启动一个知识库,其中包含你所有的流程定义和创建会话,然后使用执行你所有的流程。正如上文所述,jBPM的API,因此可用于:(1)创建一个

6、知识库,其中包含您的流程定义(2)创建一个会话启动新的进程实例,信号现有注册侦听等。1)知识库通过知识库加载流程定义,通过以下代码实现view sourceprint?KnowledgeBuilderkbuilder=KnowledgeBuilderFactory.newKnowledgeBuilder();kbuilder.add(ResourceFactory.newClassPathResource(MyProcess.bpmn),ResourceType.BPMN2);KnowledgeBasekbase=kbuilder.newKnowledgeBase();ResourceFact

7、ory有类似的方法来加载文件系统的文件,从URL,InputStream中,等2)Session一旦你加载你的知识库,你应该创建一个会话与引擎交互。本次会议可以被用来启动新的进程,信号事件等,下面的代码片段显示了它是多么容易创建较早创建的知识库为基础的会话,并启动一个进程(ID)。view sourceprint?StatefulKnowledgeSessionksession=kbase.newStatefulKnowledgeSession();ProcessInstanceprocessInstance=ksession.startProcess(com.sample.MyProcess

8、);ProcessRuntime接口定义了所有的会议方法与流程交互,如下所示。view sourceprint?/*Startanewprocessinstance.Theprocess(definition)thatshould*beusedisreferencedbythegivenprocessid.*paramprocessIdTheidoftheprocessthatshouldbestarted*returntheProcessInstancethatrepresentstheinstanceoftheprocessthatwasstarted*/ProcessInstancest

9、artProcess(StringprocessId);/*Startanewprocessinstance.Theprocess(definition)thatshould*beusedisreferencedbythegivenprocessid.Parameterscanbepassed*totheprocessinstance(asname-valuepairs),andthesewillbeset*asvariablesoftheprocessinstance.*paramprocessIdtheidoftheprocessthatshouldbestarted*paramparam

10、eterstheprocessvariablesthatshouldbesetwhenstartingtheprocessinstance*returntheProcessInstancethatrepresentstheinstanceoftheprocessthatwasstarted*/ProcessInstancestartProcess(StringprocessId,Mapparameters);/*Signalstheenginethataneventhasoccurred.Thetypeparameterdefines*whichtypeofeventandtheeventpa

11、rametercancontainadditionalinformation*relatedtotheevent.Allprocessinstancesthatarelisteningtothistype*of(external)eventwillbenotified.Forperformancereasons,thistypeofevent*signalingshouldonlybeusedifoneprocessinstanceshouldbeabletonotify*otherprocessinstances.Forinternaleventwithinoneprocessinstanc

12、e,usethe*signalEventmethodthatalsoincludetheprocessInstanceIdoftheprocessinstance*inquestion.*paramtypethetypeofevent*parameventthedataassociatedwiththisevent*/voidsignalEvent(Stringtype,Objectevent);/*Signalstheprocessinstancethataneventhasoccurred.Thetypeparameterdefines*whichtypeofeventandtheeven

13、tparametercancontainadditionalinformation*relatedtotheevent.Allnodeinstancesinsidethegivenprocessinstancethat*arelisteningtothistypeof(internal)eventwillbenotified.Notethattheevent*willonlybeprocessedinsidethegivenprocessinstance.Allotherprocessinstances*waitingforthistypeofeventwillnotbenotified.*p

14、aramtypethetypeofevent*parameventthedataassociatedwiththisevent*paramprocessInstanceIdtheidoftheprocessinstancethatshouldbesignaled*/voidsignalEvent(Stringtype,Objectevent,longprocessInstanceId);/*Returnsacollectionofcurrentlyactiveprocessinstances.Notethatonlyprocess*instancesthatarecurrentlyloadedandactiveinsidetheenginewillbereturned.*Whenusingpersistence,itislikelynotallrunningprocessinstanceswillbeloaded*astheirstatewillbestoredpersistently.Itisrecommendednottousethis*methodtocollectinformationaboutth

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号