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);
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);
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.Values Default An instance of
EntityManagerAutomatically 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.
Values Default An instance of
EntityManagerAutomatically created from the provided
EntityManagerFactory- DATE_FORMATS
- This property is not used.
- ENTITY_MANAGER_FACTORY
The
EntityManagerFactoryused in the Red Hat JBoss BPM Suite engine.Values Default An instance of
EntityManagerFactoryN/A
- GLOBALS
Values Default 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.
Values Default An instance of
org.kie.api.marshalling.ObjectMarshallingStrategyDependent on the engine configuration. If no other strategy is available,
org.drools.core.marshalling.impl.SerializablePlaceholderResolvingStrategyis used.- PERSISTENCE_CONTEXT_MANAGER
The
ProcessPersistenceContextManagerinstance used for process persistence.Values Default An instance of
org.jbpm.persistence.ProcessPersistenceContextManagerAn instance of
org.jbpm.persistence.JpaProcessPersistenceContextManager- TASK_PERSISTENCE_CONTEXT_MANAGER
The
TaskPersistenceContextManagerinstance used for task persistence.Values Default An instance of
org.kie.internal.task.api.TaskPersistenceContextManagerAn instance of
org.jbpm.services.task.persistence.JPATaskPersistenceContextManager- TASK_USER_GROUP_CALLBACK
Get the
UserGroupCallbackinstance from the environment or context. For example:callback = context.get(EnvironmentName.TASK_USER_GROUP_CALLBACK)
Values Default Configured by Red Hat JBoss BPM Suite
An instance of
org.kie.internal.task.api.UserGroupCallback- TASK_USER_INFO
Get the
UserInfoinstance from the environment or context. For example:info = context.get(EnvironmentName.TASK_USER_INFO)
Values Default Configured by Red Hat JBoss BPM Suite
An instance of
org.kie.internal.task.api.UserInfo- TRANSACTION
Optional property if
UserTransactioncan not be obtained using JNDI lookup.Values Default An instance of
UserTransactionnull- TRANSACTION_MANAGER
Get the
TransactionManagerinstance from the environment or context. For example:info = context.get(EnvironmentName.TRANSACTION_MANAGER)
Values Default An instance of
TransactionManagerDepends 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.
Values Default An instance of
TransactionSynchronizationRegistryTaken 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.
Values Default trueorfalsefalse- USE_PESSIMISTIC_LOCKING
When enabled, a database resource can only be accessed by one transaction at a time.
Values Default trueorfalsefalse

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.