Maciej Swiderski [
http://community.jboss.org/people/swiderski.maciej] replied to the
discussion
"JBPM-2856 delete sub process instance after it ends"
To view the discussion, visit:
http://community.jboss.org/message/543235#543235
--------------------------------------------------------------
Hi,
HuiSheng Xu wrote:
And you said 'deleteProcessInstance method of DBSession should take care of deleting
remaining subprocess instances', do you mean that we needn't delete the sub
processInstance after SubProcessActivity signaled, but could leave them alive until the
end of superProcessInstance ended, so the deleteProcessInstance could delete them all?
Yes, this is pretty much what I was saying.
Please review attached patches (providing two options):
opt1 - utilizes end method of ExecutionImpl to clean up
opt2 - removes reset of subProcessInstance in signal method of SubProcessActivity
HuiSheng Xu wrote:
But I am not clear what you point to. In the signal() in SubProcessActivity, it has to
get related subProcessInstance first, and cancel the bid-relationship between
superProcessInstance and subProcessInstance, otherwise we can't delete
subprocessInstance directly, Database will throw a FK related exception. Do you mean
this?
I have not experienced any problems with db constraint violations. But I agree
that if that will pop up that solution is not an option any more.
Please review the patches and let me know your comments.
P.S.
I tried to upload them to jira but seems like it is not fully available at the moment,
upgrade is on its wa.
Cheers,
Maciej
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/543235#543235]
Start a new discussion in jBPM Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]