Bug 771854 - ProcessInstance state is not updated after rollback
Summary: ProcessInstance state is not updated after rollback
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRE (Expert, Fusion)
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: lcarlon
QA Contact: Tomas Schlosser
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-05 09:15 UTC by Tomas Schlosser
Modified: 2012-06-25 02:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-25 02:58:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Simple reproducer (Eclipse project) (6.77 KB, application/x-gzip)
2012-01-05 09:15 UTC, Tomas Schlosser
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 771840 0 unspecified CLOSED Activations are not deleted after rollback 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 771917 0 unspecified CLOSED Transactions are broken 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 799768 0 unspecified CLOSED [tech review] Document persistence in the BPM guide 2021-02-22 00:41:40 UTC

Internal Links: 771840 771917 799768

Description Tomas Schlosser 2012-01-05 09:15:08 UTC
Created attachment 550858 [details]
Simple reproducer (Eclipse project)

Description of problem:
When transaction is rolled back, the state of ProcessInstance is not changed.

Version-Release number of selected component (if applicable):
BRMS-5.3.0.ER1

How reproducible:
Every time

Steps to Reproduce:
1. start process (pi = ksession.startProcess("..."))
2. start transaction
3. abort process within transaction
4. rollback transaction
5. execute pi.getState()
6. execute ksession.getProcessInstance(pi.getId()).getState()
  
Actual results:
5. returns STATE_ABORTED (3)
6. returns STATE_ACTIVE (1)

Expected results:
Both 5. and 6. return STATE_ACTIVE (1)

Additional info:

Comment 1 Kris Verlaenen 2012-01-16 20:41:36 UTC
The process instance that you retrieve when you execute some commands (like startProcess in this case) in combination with persistence, is a disconnected process instance, which is a snapshot of the state of the process instance when the command completed.  If the process instance has changed state since that point however, it will not update itself anymore.  

You can however always retrieve the latest snapshot state by using ksession.getProcessInstance(id).

I would say that the behaviour as described here is the expected behaviour.

Comment 3 Tomas Schlosser 2012-01-20 09:25:43 UTC
It sounds logical as you described it.
However if I didn't expect it I think there might be others that won't expect it either. So I suggest adding this to documentation to prevent misunderstanding in the future.

Comment 5 Lukáš Petrovický 2012-03-20 17:31:51 UTC
Lee, this behavior and the one described in 771840 will require some careful documentation, so that we set the proper expectations.

Comment 9 Tomas Schlosser 2012-04-19 09:47:55 UTC
This is already included in BRMS BPM user guide, therefore marking the bug as verified.


Note You need to log in before you can comment on or make changes to this bug.