Unable to view process instances stored with state "0" in business central for BPM Suite 6.0.3
Environment
- Red Hat JBoss BPM Suite (BPMS)
- 6.0.3
Issue
- Active process instances with state
0
are not displayed in business central; - The process instances should be stored as active process, it is state
1
instead of0
; - Why the created process instance is stored as stated
0
? What does that mean? - There are a lof of process instances stored in the database with state
0
.
Resolution
-
BPM Suite engine works with status
0 = STATE_PENDING
,1 = STATE_ACTIVE
,2 = STATE_COMPLETED
,3 = STATE_ABORTED
and4 = STATE_SUSPENDED
. Then, the status0
is thePENDING
State. Such state is created when called the method:kieSession.createProcessInstance
, andkieSession.startProcessInstance
is not called or does not commit in a transaction. Some developers call incorrectlycreateProcessInstance
thinking that it initiates processes, which can only be done callingstartProcessInstance
. -
business-central
does not show processes inPENDING
state, so the behavior is expected.
Root Cause
- The
kieSession.createProcessInstance
is used instead ofkieSession.startProcessInstance
.
Diagnostic Steps
- Check if
kieSession.createProcessInstance
is called to create and start processes.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments