简体   繁体   English

如何使运行Activiti Modeller的应用程序中的计时器后的任务和脚本任务服务不会导致错误?

[英]How to make so that, when running Activiti Modeller, in my application, the task and script task service after the timers do not cause errors?

If Activiti Modeler is running simultaneously with my application, and if it uses the same database for the Activiti engine as my application, then the service task and script task following the timers (the boundary timer event and the intermediate catching event) do not work, and cause errors. 如果Activiti Modeler与我的应用程序同时运行,并且它为Activiti引擎使用的数据库与我的应用程序相同,则计时器之后的服务任务和脚本任务(边界计时器事件和中间捕获事件)将不起作用,并导致错误。 Error descriptions are as follows: "couldn't instantiate " - for the service task (if the class is specified), "Can't find a scripting engine for 'groovy'" - for the script task. 错误描述如下:对于服务任务,“无法实例化”(如果指定了类),对于脚本任务,“无法为'groovy'找到脚本引擎”。 If I use Spring, and assign a bean to the service task, then I get an error with the description: "Could not execute service task expression". 如果我使用Spring,并为服务任务分配一个bean,那么我将得到错误描述:“无法执行服务任务表达式”。

At the same time I found and tried this recommendation: 同时,我找到并尝试了以下建议:

In order for everything to work without errors, you need to compile the classes that are used by the service task, and put them with all the packages in which they are located in the WEB_INF/classes folder. 为了使所有内容正常运行,您需要编译服务任务使用的类,并将它们与位于其中的所有程序包放到WEB_INF / classes文件夹中。 Also, in order to avoid problems with the groovy, it is necessary in WEB_INF/lib to throw the jar-file of this library, and that used by the main program (the same version). 另外,为了避免常规问题,有必要在WEB_INF / lib中抛出该库的jar文件以及主程序使用的jar文件(相同版本)。

This works if Spring beans are not used. 如果不使用Spring bean,这将起作用。 But this is also a crutch solution, and I would like to disable all event timer events in the database in Activiti Modeler. 但这也是一个拐杖解决方案,我想在Activiti Modeler中禁用数据库中的所有事件计时器事件。 Not yet found how to do it. 尚未找到如何做。

I watched the documentation for the system administrator. 我看了系统管理员的文档。 It says about the properties that can be set in activiti-app.properties. 它说明了可以在activiti-app.properties中设置的属性。 I found several properties that, judging by the description, can help me, and tried to set the necessary values ​​for them: 根据描述判断,我发现了一些可以帮助我的属性,并尝试为它们设置必要的值:

elastic-search.server.type=none
event.processing.enabled=false
event.generation.enabled=false

But this also gave nothing. 但这也什么也没有。

That is a limitation of running timers based on things that you are changing at runtime. 这是基于您在运行时更改的内容运行计时器的限制。 We are fixing this in Activiti Cloud (Activiti 7) by separating the runtime in containers instead of just having a single monolithic application. 我们通过将容器中的运行时分开,而不是只有一个整体的应用程序,来在Activiti Cloud(Activiti 7)中解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM