-
1. Re: JBPM-2856 delete sub process instance after it ends
swiderski.maciej May 14, 2010 6:57 AM (in response to rebody)Hi,
I just took a look at your patch and I am not completely sure we should solve it like this.
In general deleteProcessInstance method of DBSession should take care of deleting remaining subprocess instances. But the problem is in SubProcessActivity that within signal methods is resetting subProcessInstance field.
Simple comment that line will make execution being properly removed.
What do you think about it?
Cheers,
Maciej
-
2. Re: JBPM-2856 delete sub process instance after it ends
rebody May 14, 2010 10:20 PM (in response to swiderski.maciej)Hi Maciej,
Thank you for reviewing my patch.
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?
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?
If you could show more details, it will be very appreciate. Thank you once again.
-
3. Re: JBPM-2856 delete sub process instance after it ends
swiderski.maciej May 15, 2010 7:50 AM (in response to rebody)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
-
JBPM-2856-opt2.patch.zip 1.8 KB
-
JBPM-2856-opt1.patch.zip 1.7 KB
-
-
4. Re: JBPM-2856 delete sub process instance after it ends
rebody May 16, 2010 4:55 AM (in response to swiderski.maciej)Hi Maciej,
I love the first option very much. Thank you for your job. It is wonderful. I create some more testcase and all of them could pass.
If no one disagree, I will commit this patch and resolve the issue.
-
5. Re: JBPM-2856 delete sub process instance after it ends
swiderski.maciej May 16, 2010 5:09 AM (in response to rebody)Hi,
glad you liked it.
Please attach your complete patch to jira as soon as it will be possible just for keeping the record.
Keep up the good work
Maciej
-
6. Re: JBPM-2856 delete sub process instance after it ends
rebody May 16, 2010 6:34 AM (in response to swiderski.maciej)Hi Maciej,
Cannot upload any attaches to JIRA. Still tell me that I have no authority to do that.
And the new JIRA is too slow to use. I don't understand why they must upgrade to JIRA 4 at this time.
-
7. Re: JBPM-2856 delete sub process instance after it ends
swiderski.maciej May 17, 2010 12:44 PM (in response to rebody)Hi,
just so you know, jira is working fine now. You can upload the patch whenever you have a minute.
Cheers,
Maciej
-
8. Re: JBPM-2856 delete sub process instance after it ends
rebody May 20, 2010 1:41 AM (in response to swiderski.maciej)Hi Maciej,
Just upload patch. Thank you for noticing.
If there is no objection, I will commit it to the svn repository.