问题描述
我正在尝试使用JBPM 6进行一些测试.我目前正在工作一个简单的hello world bpmn2文件,该文件已正确加载.
I'm trying to implement a few tests with JBPM 6. I'm currently working a a simple hello world bpmn2 file, which is loaded correctly.
我对文档的了解(单击)是默认情况下应禁用持久性. 默认情况下,如果不配置流程引擎,则流程实例不会被持久化."
My understading of the documentation ( Click ) is that persistence should be disabled by default. "By default, if you do not configure the process engine otherwise, process instances are not made persistent."
但是,当我尝试实现它时,并没有做任何特殊的事情来启用持久性,每次尝试做任何事情时,我都会遇到与持久性相关的问题.
However, when I try to implement it, and without doing anything special to enable persistence, I hit persistence related problems every time I try to do anything.
javax.persistence.PersistenceException: No Persistence provider for EntityManager named org.jbpm.persistence.jpa
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:69)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)
at org.jbpm.runtime.manager.impl.jpa.EntityManagerFactoryManager.getOrCreate(EntityManagerFactoryManager.java:33)
at org.jbpm.runtime.manager.impl.DefaultRuntimeEnvironment.init(DefaultRuntimeEnvironment.java:73)
at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.get(RuntimeEnvironmentBuilder.java:400)
at org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder.get(RuntimeEnvironmentBuilder.java:74)</blockquote>
我通过以下方式创建运行时环境
I Create my runtime environement the following way,
RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get()
.newDefaultInMemoryBuilder()
.persistence(false)
.addAsset(ResourceFactory.newClassPathResource("examples/helloworld.bpmn2.xml"), ResourceType.BPMN2)
.addAsset(ResourceFactory.newClassPathResource("examples/newBPMNProcess.bpmn"), ResourceType.BPMN2)
.get();
由于我的理解是默认情况下应禁用持久性,所以我看不到我在做什么错.它可以链接到某些依赖项中,但是我也没有找到任何东西.
As my understanding is that persistence should be disabled by default, I don't see what I'm doing wrong. It could be linked to something included in some of my dependencies, but I don't have found anything on it either.
有人已经遇到过相同的问题或有任何建议吗?
Has anybody faced the same issue already or has any advice.
谢谢
推荐答案
RuntimeManager是流程引擎和人工任务服务的组合.人工任务服务需要持久性(以开始人工任务等),这就是为什么即使您将引擎配置为不使用持久性,它仍然要求数据源的原因.
A RuntimeManager is a combination of a process engine and a human task service. The human task service needs persistence (to start the human tasks etc.), that's why it's still asking for a datasource, even if you configure the engine to not use persistence.
如果您想使用没有我们的人工服务的引擎,则根本不需要持久性,但是在那种情况下,我不会使用RuntimeManager,只需直接从kbase创建一个ksession即可: http://docs.jboss.org/jbpm/v6.1 /userguide/jBPMCoreEngine.html#d0e1805
If you want to use an engine without our human task service, you don't need persistence at all, but I wouldn't use a RuntimeManager in that case, simply create a ksession from the kbase directly:http://docs.jboss.org/jbpm/v6.1/userguide/jBPMCoreEngine.html#d0e1805
这篇关于如何禁用JBPM持久性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!