Unable to view process instances stored with state "0" in business central for BPM Suite 6.0.3

Solution Unverified - Updated -

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 of 0;
  • 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 and 4 = STATE_SUSPENDED. Then, the status 0 is the PENDING State. Such state is created when called the method: kieSession.createProcessInstance, and kieSession.startProcessInstance is not called or does not commit in a transaction. Some developers call incorrectly createProcessInstance thinking that it initiates processes, which can only be done calling startProcessInstance.

  • business-central does not show processes in PENDING state, so the behavior is expected.

Root Cause

  • The kieSession.createProcessInstance is used instead of kieSession.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