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

13.2. Process Instance


Process instances are persisted as ProcessInstanceInfo entities, which persist the state of a process instance on runtime and store the following data:
Expand
Table 13.2. 
Field Description Nullable
instanceid
primary key
false
lastmodificationdate
last saved to data store
N/A
lastreaddate
last read from data store
N/A
processid
ID of the process the instance is based on
false
processinstancebytearray
binary dataset with process instance state (binary blob)
false
startdate
Process instance start date
optlock
version number used lock value for optimistic locking
state
Process instance state
false
ProcessInstanceInfo has a 1:N relationship to the EventTypes entity.
The EventTypes entity contains the following data:
Expand
Table 13.3. 
Field Description Nullable
instanceid
reference to the Process instance (foreign key to the processinstanceinfo)
false
element
text field related to an event the Process instance has undergone

Pessimistic Locking Support

The default locking mechanism for persistence of processes is optimistic. With multi-thread high concurrency to the same process instance, this locking strategy can result in bad performance.
With the release of the 6.1 version of Red Hat JBoss BPM Suite, this can be changed at runtime to allow the user to set locking on a per process basis and to allow it to be pessimistic (the change can be made at a per KIE Session level or Runtime Manager level as well and not just at the process level).
To set a process to use pessmistic locking, do this in the runtime environment:
import org.kie.api.runtime.Environment;
import org.kie.api.runtime.EnvironmentName;
import org.kie.api.runtime.manager.RuntimeManager;
import org.kie.api.runtime.manager.RuntimeManagerFactory;

...

// here env is an instance of org.kie.api.runtime.Environment
env.set(EnvironmentName.USE_PESSIMISTIC_LOCKING, true);

// now create your Runtime Manager using this enviornment
RuntimeManager manager = RuntimeManagerFactory.Factory.get().newPerRequestRuntimeManager(environment);
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat
返回顶部