此内容没有您所选择的语言版本。

A.2. Environment Properties


As opposed to system properties, environment properties are passed to an individual KieSession, allowing you to control its behaviour independently on the rest of the deployment.

The properties available to you are the constants of the class org.kie.api.runtime.EnvironmentName.

A.2.1. Configuration

To set the environment properties on a KieSession, you can create a new session with an instance of the Environment or RuntimeEnvironment interface:

Setting Environment Property using Environment interface

Environment env = EnvironmentFactory.newEnvironment();
env.set(EnvironmentName.SAMPLE_PROPERTY, true);
kbase.newKieSession(null, env);
Copy to Clipboard Toggle word wrap

Setting Environment Property using RuntimeEnvironment interface

RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get()
.newDefaultBuilder()
....

environment.getEnvironment().set(EnvironmentName.SAMPLE_PROPERTY, true);
singletonManager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
Copy to Clipboard Toggle word wrap

A.2.2. List of Environment Properties

This section contains the alphabetically sorted list of all recognized environment properties in Red Hat JBoss BPM Suite 6.3.

Red Hat JBoss BPM Suite Environment Properties

APP_SCOPED_ENTITY_MANAGER

The entity manager used for persistence of SessionInfo. You can specify it when using Spring with local transactions and a shared entity manager.

Expand
ValuesDefault

An instance of EntityManager

Automatically created from the provided EntityManagerFactory

CALENDARS
This property is not used.
CMD_SCOPED_ENTITY_MANAGER

The entity manager used for persistence of entities (process instances, tasks, work items). You can specify it when using Spring with local transactions and a shared entity manager.

Expand
ValuesDefault

An instance of EntityManager

Automatically created from the provided EntityManagerFactory

DATE_FORMATS
This property is not used.
ENTITY_MANAGER_FACTORY

The EntityManagerFactory used in the Red Hat JBoss BPM Suite engine.

Expand
ValuesDefault

An instance of EntityManagerFactory

N/A

GLOBALS
Expand
ValuesDefault

Any object declared in DRL or BPMN

N/A

OBJECT_MARSHALLING_STRATEGIES

Enable use of pluggable variable persistence strategies. Allows storing variables in different data stores.

Expand
ValuesDefault

An instance of org.kie.api.marshalling.ObjectMarshallingStrategy

Dependent on the engine configuration. If no other strategy is available, org.drools.core.marshalling.impl.SerializablePlaceholderResolvingStrategy is used.

PERSISTENCE_CONTEXT_MANAGER

The ProcessPersistenceContextManager instance used for process persistence.

Expand
ValuesDefault

An instance of org.jbpm.persistence.ProcessPersistenceContextManager

An instance of org.jbpm.persistence.JpaProcessPersistenceContextManager

TASK_PERSISTENCE_CONTEXT_MANAGER

The TaskPersistenceContextManager instance used for task persistence.

Expand
ValuesDefault

An instance of org.kie.internal.task.api.TaskPersistenceContextManager

An instance of org.jbpm.services.task.persistence.JPATaskPersistenceContextManager

TASK_USER_GROUP_CALLBACK

Get the UserGroupCallback instance from the environment or context. For example:

callback = context.get(EnvironmentName.TASK_USER_GROUP_CALLBACK)
Copy to Clipboard Toggle word wrap
Expand
ValuesDefault

Configured by Red Hat JBoss BPM Suite

An instance of org.kie.internal.task.api.UserGroupCallback

TASK_USER_INFO

Get the UserInfo instance from the environment or context. For example:

info = context.get(EnvironmentName.TASK_USER_INFO)
Copy to Clipboard Toggle word wrap
Expand
ValuesDefault

Configured by Red Hat JBoss BPM Suite

An instance of org.kie.internal.task.api.UserInfo

TRANSACTION

Optional property if UserTransaction can not be obtained using JNDI lookup.

Expand
ValuesDefault

An instance of UserTransaction

null

TRANSACTION_MANAGER

Get the TransactionManager instance from the environment or context. For example:

info = context.get(EnvironmentName.TRANSACTION_MANAGER)
Copy to Clipboard Toggle word wrap
Expand
ValuesDefault

An instance of TransactionManager

Depends on your configuration

TRANSACTION_SYNCHRONIZATION_REGISTRY

Allows access to and control of the active transaction. Used by Red Hat JBoss BPM Suite to efficiently manage persistence.

Expand
ValuesDefault

An instance of TransactionSynchronizationRegistry

Taken from the environment—​usually JNDI lookup in JTA environments

USE_LOCAL_TRANSACTIONS

When enabled, Red Hat JBoss BPM Suite uses local transactions as opposed to JTA.

Expand
ValuesDefault

true or false

false

USE_PESSIMISTIC_LOCKING

When enabled, a database resource can only be accessed by one transaction at a time.

Expand
ValuesDefault

true or false

false

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat