ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Flowable 6.6.0 BPMN用户指南 -(6)部署 - 6.3 外部资源

2021-01-01 11:31:59  阅读:414  来源: 互联网

标签:process BPMN Flowable Spring 6.6 classes webapp your


6.3 外部资源

Process definitions live in the Flowable database. These process definitions can reference delegation classes when using Service Tasks or execution listeners or Spring beans from the Flowable configuration file. These classes and the Spring configuration file have to be available to all process engines that may execute the process definitions.

流程定义位于Flowable数据库中。当通过Flowable配置文件使用服务任务(Service Task)、或执行侦听器(execution listener)、或Spring bean时,这些流程定义可以引用委托类(delegation class)。这些类和Spring配置文件必须对可能执行这些流程定义的流程引擎可用。

6.3.1 Java类

All custom classes that are used in your process (for example, JavaDelegates used in Service Tasks or event-listeners, TaskListeners and so on) should be present on the engine’s classpath when an instance of the process is started.

During deployment of a business archive however, those classes don’t have to be present on the classpath. This means that your delegation classes don’t have to be on the classpath when deploying a new business archive with Ant, for example.

When you are using the demo setup and you want to add your custom classes, you should add a JAR containing your classes to the flowable-task or flowable-rest webapp lib. Don’t forget to include the dependencies of your custom classes (if any) as well. Alternatively, you can include your dependencies in the libraries directory of your Tomcat installation, ${tomcat.home}/lib.

当启动流程实例时,流程中使用的所有自定义类(例如,在服务任务或事件侦听器、任务侦听器等中使用的JavaDelegates)都应该出现在引擎的classpath上。

但是,在部署业务归档时,这些类不必出现在classpath上。这意味着,例如,使用Ant部署新的业务归档时,委托类(delegation classe)不必位于classpath上。

当您使用demo设置并希望添加自定义类时,您应该将包含该类的JAR添加到flowable-task或flowable-rest webapp lib中。同样,别忘了包括自定义类的依赖项(如果有的话)。或者,可以在Tomcat安装的libraries目录中包含依赖项${tomcat.home}/lib。

6.3.2 通过流程使用Spring bean

When expressions or scripts use Spring beans, those beans have to be available to the engine when executing the process definition. If you are building your own webapp and you configure your process engine in your context as described in the spring integration section, that is straightforward. But bear in mind that you also should update the Flowable task and rest webapps with that context if you use it.

当表达式或脚本使用Spring bean时,在执行流程定义时,这些bean必须对引擎可用。如果您正在构建自己的webapp,并且按照Spring集成章节中的描述在您的上下文中配置流程引擎,那么这很简单直观。但是请记住,如果您使用了Flowable任务和rest webapps,那么也应该使用该上下文更新它。

6.3.3 创建单个应用

Instead of making sure that all process engines have all the delegation classes on their classpath and use the right Spring configuration, you may consider including the Flowable REST webapp inside your own webapp so that there is only a single ProcessEngine.

除了确保所有流程引擎在其classpath上都有所有的委托类并使用正确的Spring配置,您也可以考虑在自己的webapp中包含Flowable REST webapp,这样只有一个ProcessEngine。

标签:process,BPMN,Flowable,Spring,6.6,classes,webapp,your
来源: https://blog.csdn.net/weixin_52265084/article/details/112059075

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有