1 / 31
文档名称:

工作流Activit介绍与应用.docx

格式:docx   大小:160KB   页数:31页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

工作流Activit介绍与应用.docx

上传人:青青松松 2022/7/28 文件大小:160 KB

下载得到文件列表

工作流Activit介绍与应用.docx

文档介绍

文档介绍:工作流Activiti介绍与应用
工作流(workflow)就是工作流程的计算模型,即将工作流程中的工作怎样前后组织
在一同的逻辑和规则在计算机中以适合的模型进行表示并对其实施计算。我的理解就是:
将部分或许全figurationImpl下面有三个直
接的子类,其中ProcessEngineConfiguration和ProcessEngineConfigurationImpl都是
抽象类。这个类是我们编程时第一个使用的类,有了这个类的层级结构,我们就比较容易
理解经过该类获取各样详细实现的ProcessEngineConfiguration类的实例了。
( );
("");
( );
经过上面的方法,能够获取流程引擎的配置类的实例,这些实例有的是经过配置文件
进行配置的,有的则是经过程序的方法进行指定,比方:
( );
生成这样的配置实例后,需要对该实例进行数据库连结有关的配置等等。

ACTIVITI所有履行过程都是采用命令模式,使用命令履行器进行履行,这个但是从
RuntimeServiceImpl启动流程的代码能够看出来:
publicProcessInstancestartProcessInstanceByKey(StringprocessDefinitionKey,
StringbusinessKey){
return(newStartProcessInstanceCmd<ProcessInstance>(processDefinitionKey,
null,businessKey,null));
}
为了认识命令履行commandExecutor,特分如下几节来说明它的结构,传达,以及命令
履行履行的过车过你。
命令履行器的结构
命令履行器是一个采用***链式的结构,这个能够从如下的剖析得出:
commandExecutor对象是首先在ProcessEngineConfigurationImpl的初始化方法中产生:
protectedvoidinitCommandExecutor( ){
if(commandExecutor==null){
CommandInterceptorfirst=initInterceptorChain(commandInterceptors);
commandExecutor=newCommandExecutorImpl(getDefaultCommandConfig( ),
first);
}
}
而这个命令履行器commandExecutor的结构过程中跟commandInterceptors中的第一个命令
***有关,而commandInterceptors是命令***的列表。
protectedvoidinitCommandInterceptors( ){
if(commandInterceptors==null){
commandInterceptors=newArrayList<CommandInterceptor>( );
if(customPreCommandInterceptors!=null){
(customPreCommandInterceptors);
}
(getDefaultCommandInterceptors( ));
(

if

(customPostCommandInterceptors!=null){customPostCommandInterceptors);
}
(

commandInvoker);
}
}
protectedCollection<extendsCommandInterceptor>
getDefaultComman