[
https://jira.jboss.org/jira/browse/JBPM-2707?page=com.atlassian.jira.plug...
]
Martin Porter updated JBPM-2707:
--------------------------------
Summary: Parent Process 'end' state not set correctly on process instance
when async subprocess has exited (was: Parent Process End state (error) not set when
child process has exited with same 'end-error' state)
Description:
I have a parent process which invokes a child process (subprocess) with
continue="async". When the child process exits with state 'end-error'
the engine handles this correctly but when I attempt to check the end state of the parent
process the state is returned as 'async' instead of 'end-error'. The
following output from the child termination and the assertion shows the error clearly:-
14:17:28,035 FIN | [HibernateSessionResource] ----- committing hibernate tx 29249852
-------------------------------------------------------
14:17:28,035 FIN | [ExecuteJobCmd] executing job ExecuteActivityMessage[80076]...
14:17:28,038 FIN | [ExecuteActivity] executing activity(Business Service Response
Handler)
14:17:28,040 FIN | [ExecuteJobCmd] executed job ExecuteActivityMessage[80076]
14:17:28,041 FIN | [HibernateSessionResource] ----- committing hibernate tx 19509363
-------------------------------------------------------
14:17:33,030 FIN | [HibernateSessionResource] ----- beginning hibernate tx 3662367
--------------------------------------------------------
14:17:33,033 FIN | [Signal] signalling activity(Invoke Child Process),
signalName=error-fail
14:17:33,035 FIN | [HibernateSessionResource] ----- beginning hibernate tx 7392722
--------------------------------------------------------
14:17:33,036 FIN | [HibernateSessionResource] ----- committing hibernate tx 27645654
-------------------------------------------------------
14:17:33,036 FIN | [ExecuteActivity] executing activity(end-error)
14:17:33,036 FIN | [ExecutionImpl]
execution[org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey--1858395621] ends
with state error
14:17:33,037 FIN | [HibernateSessionResource] ----- beginning hibernate tx 18357747
--------------------------------------------------------
14:17:33,040 FIN | [HibernateSessionResource] ----- committing hibernate tx 9669450
-------------------------------------------------------
14:17:33,051 FIN | [DbSessionImpl] deleting process instance
org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey--1858395621
14:17:33,057 FIN | [HibernateSessionResource] ----- committing hibernate tx 28014118
-------------------------------------------------------
14:17:38,040 FIN | [HibernateSessionResource] ----- beginning hibernate tx 3709218
--------------------------------------------------------
14:17:38,041 FIN | [HibernateSessionResource] ----- committing hibernate tx 32379995
-------------------------------------------------------
14:17:38,060 SEV | [BaseJbpmTestCase]
### EXCEPTION ###########################################
14:17:38,061 SEV | [BaseJbpmTestCase] ASSERTION FAILURE: expected:<[error]> but
was:<[async]>
junit.framework.ComparisonFailure: expected:<[end-error]> but was:<[async]>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
This behaviour is also the same when the child processes exits with 'end-cancel'
also as shown below. The process exit state is correct in the process engine but the state
is left as 'async':-
15:06:38,884 FIN | [ExecuteActivity] executing activity(end-success)
15:06:38,884 FIN | [ExecutionImpl]
execution[org.jbpm.examples.subprocess.usecase.waitstate.child.110020] ends with state
end-success
15:06:38,888 FIN | [Signal] signalling activity(Invoke Child Process), signalName=null
15:06:38,890 FIN | [ExecuteActivity] executing activity(end-success)
15:06:38,890 FIN | [ExecutionImpl]
execution[org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey-518415565] ends
with state ended
15:06:38,938 FIN | [DbSessionImpl] deleting process instance
org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey-518415565
15:06:38,946 FIN | [DbSessionImpl] deleting process instance
org.jbpm.examples.subprocess.usecase.waitstate.child.110020
15:06:38,985 FIN | [HibernateSessionResource] ----- committing hibernate tx 22588100
-------------------------------------------------------
15:06:38,987 FIN | [HibernateSessionResource] ----- beginning hibernate tx 30628850
--------------------------------------------------------
15:06:38,987 FIN | [TaskQueryImpl] select task from org.jbpm.pvm.internal.task.TaskImpl as
task where task.processInstance.id =
'org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey-518415565'
15:06:38,988 FIN | [HibernateSessionResource] ----- committing hibernate tx 23322190
-------------------------------------------------------
15:06:38,988 FIN | [HibernateSessionResource] ----- beginning hibernate tx 27654099
--------------------------------------------------------
15:06:38,988 FIN | [HibernateSessionResource] ----- committing hibernate tx 2695106
-------------------------------------------------------
15:06:39,008 SEV | [BaseJbpmTestCase]
### EXCEPTION ###########################################
15:06:39,009 SEV | [BaseJbpmTestCase] ASSERTION FAILURE: expected:<[end]> but
was:<[async]>
junit.framework.ComparisonFailure: expected:<[end]> but was:<[async]>
was:
I have a parent process which invokes a child process (subprocess) with
continue="async". When the child process exits with state 'end-error'
the engine handles this correctly but when I attempt to check the end state of the parent
process the state is returned as 'async' instead of 'end-error'. The
following output from the child termination and the assertion shows the error clearly:-
14:17:28,035 FIN | [HibernateSessionResource] ----- committing hibernate tx 29249852
-------------------------------------------------------
14:17:28,035 FIN | [ExecuteJobCmd] executing job ExecuteActivityMessage[80076]...
14:17:28,038 FIN | [ExecuteActivity] executing activity(Business Service Response
Handler)
14:17:28,040 FIN | [ExecuteJobCmd] executed job ExecuteActivityMessage[80076]
14:17:28,041 FIN | [HibernateSessionResource] ----- committing hibernate tx 19509363
-------------------------------------------------------
14:17:33,030 FIN | [HibernateSessionResource] ----- beginning hibernate tx 3662367
--------------------------------------------------------
14:17:33,033 FIN | [Signal] signalling activity(Invoke Child Process),
signalName=error-fail
14:17:33,035 FIN | [HibernateSessionResource] ----- beginning hibernate tx 7392722
--------------------------------------------------------
14:17:33,036 FIN | [HibernateSessionResource] ----- committing hibernate tx 27645654
-------------------------------------------------------
14:17:33,036 FIN | [ExecuteActivity] executing activity(end-error)
14:17:33,036 FIN | [ExecutionImpl]
execution[org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey--1858395621] ends
with state error
14:17:33,037 FIN | [HibernateSessionResource] ----- beginning hibernate tx 18357747
--------------------------------------------------------
14:17:33,040 FIN | [HibernateSessionResource] ----- committing hibernate tx 9669450
-------------------------------------------------------
14:17:33,051 FIN | [DbSessionImpl] deleting process instance
org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey--1858395621
14:17:33,057 FIN | [HibernateSessionResource] ----- committing hibernate tx 28014118
-------------------------------------------------------
14:17:38,040 FIN | [HibernateSessionResource] ----- beginning hibernate tx 3709218
--------------------------------------------------------
14:17:38,041 FIN | [HibernateSessionResource] ----- committing hibernate tx 32379995
-------------------------------------------------------
14:17:38,060 SEV | [BaseJbpmTestCase]
### EXCEPTION ###########################################
14:17:38,061 SEV | [BaseJbpmTestCase] ASSERTION FAILURE: expected:<[error]> but
was:<[async]>
junit.framework.ComparisonFailure: expected:<[end-error]> but was:<[async]>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
Parent Process 'end' state not set correctly on process
instance when async subprocess has exited
-------------------------------------------------------------------------------------------------
Key: JBPM-2707
URL:
https://jira.jboss.org/jira/browse/JBPM-2707
Project: jBPM
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.2
Environment: Eclipse 3.5, Oracle 11g, jBPM 4.2
Reporter: Martin Porter
I have a parent process which invokes a child process (subprocess) with
continue="async". When the child process exits with state 'end-error'
the engine handles this correctly but when I attempt to check the end state of the parent
process the state is returned as 'async' instead of 'end-error'. The
following output from the child termination and the assertion shows the error clearly:-
14:17:28,035 FIN | [HibernateSessionResource] ----- committing hibernate tx 29249852
-------------------------------------------------------
14:17:28,035 FIN | [ExecuteJobCmd] executing job ExecuteActivityMessage[80076]...
14:17:28,038 FIN | [ExecuteActivity] executing activity(Business Service Response
Handler)
14:17:28,040 FIN | [ExecuteJobCmd] executed job ExecuteActivityMessage[80076]
14:17:28,041 FIN | [HibernateSessionResource] ----- committing hibernate tx 19509363
-------------------------------------------------------
14:17:33,030 FIN | [HibernateSessionResource] ----- beginning hibernate tx 3662367
--------------------------------------------------------
14:17:33,033 FIN | [Signal] signalling activity(Invoke Child Process),
signalName=error-fail
14:17:33,035 FIN | [HibernateSessionResource] ----- beginning hibernate tx 7392722
--------------------------------------------------------
14:17:33,036 FIN | [HibernateSessionResource] ----- committing hibernate tx 27645654
-------------------------------------------------------
14:17:33,036 FIN | [ExecuteActivity] executing activity(end-error)
14:17:33,036 FIN | [ExecutionImpl]
execution[org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey--1858395621] ends
with state error
14:17:33,037 FIN | [HibernateSessionResource] ----- beginning hibernate tx 18357747
--------------------------------------------------------
14:17:33,040 FIN | [HibernateSessionResource] ----- committing hibernate tx 9669450
-------------------------------------------------------
14:17:33,051 FIN | [DbSessionImpl] deleting process instance
org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey--1858395621
14:17:33,057 FIN | [HibernateSessionResource] ----- committing hibernate tx 28014118
-------------------------------------------------------
14:17:38,040 FIN | [HibernateSessionResource] ----- beginning hibernate tx 3709218
--------------------------------------------------------
14:17:38,041 FIN | [HibernateSessionResource] ----- committing hibernate tx 32379995
-------------------------------------------------------
14:17:38,060 SEV | [BaseJbpmTestCase]
### EXCEPTION ###########################################
14:17:38,061 SEV | [BaseJbpmTestCase] ASSERTION FAILURE: expected:<[error]> but
was:<[async]>
junit.framework.ComparisonFailure: expected:<[end-error]> but was:<[async]>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
This behaviour is also the same when the child processes exits with 'end-cancel'
also as shown below. The process exit state is correct in the process engine but the state
is left as 'async':-
15:06:38,884 FIN | [ExecuteActivity] executing activity(end-success)
15:06:38,884 FIN | [ExecutionImpl]
execution[org.jbpm.examples.subprocess.usecase.waitstate.child.110020] ends with state
end-success
15:06:38,888 FIN | [Signal] signalling activity(Invoke Child Process), signalName=null
15:06:38,890 FIN | [ExecuteActivity] executing activity(end-success)
15:06:38,890 FIN | [ExecutionImpl]
execution[org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey-518415565] ends
with state ended
15:06:38,938 FIN | [DbSessionImpl] deleting process instance
org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey-518415565
15:06:38,946 FIN | [DbSessionImpl] deleting process instance
org.jbpm.examples.subprocess.usecase.waitstate.child.110020
15:06:38,985 FIN | [HibernateSessionResource] ----- committing hibernate tx 22588100
-------------------------------------------------------
15:06:38,987 FIN | [HibernateSessionResource] ----- beginning hibernate tx 30628850
--------------------------------------------------------
15:06:38,987 FIN | [TaskQueryImpl] select task from org.jbpm.pvm.internal.task.TaskImpl
as task where task.processInstance.id =
'org.jbpm.examples.subprocess.usecase.waitstate.parent.jbpmKey-518415565'
15:06:38,988 FIN | [HibernateSessionResource] ----- committing hibernate tx 23322190
-------------------------------------------------------
15:06:38,988 FIN | [HibernateSessionResource] ----- beginning hibernate tx 27654099
--------------------------------------------------------
15:06:38,988 FIN | [HibernateSessionResource] ----- committing hibernate tx 2695106
-------------------------------------------------------
15:06:39,008 SEV | [BaseJbpmTestCase]
### EXCEPTION ###########################################
15:06:39,009 SEV | [BaseJbpmTestCase] ASSERTION FAILURE: expected:<[end]> but
was:<[async]>
junit.framework.ComparisonFailure: expected:<[end]> but was:<[async]>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira