move batchDelete Process Define/Instance Outside for transactional#1260
Merged
qiaozhanwei merged 1 commit intoapache:dev-dbfrom Nov 17, 2019
Merged
Conversation
qiaozhanwei
approved these changes
Nov 17, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the batchDeleteProcessDefinitionByIds & batchDeleteProcessInstanceByIds (batch operations) has Transaction problems.
they will make the inner function deleteProcessDefinitionById and deleteProcessInstanceById not transactional even if they are marked as so. If those two deleteProcessDefinitionById and deleteProcessInstanceById are called inside batchDeleteProcessDefinitionByIds & batchDeleteProcessInstanceByIds . so we need to move those batch operation out.
You can refer to https://stackoverflow.com/questions/25738883/spring-transactional-annotation-when-using-try-catch-block
In proxy mode (which is the default), only external method calls coming in through the proxy are intercepted. This means that self-invocation, in effect, a method within the target object calling another method of the target object, will not lead to an actual transaction at runtime even if the invoked method is marked with @transactional.