Skip to content

move batchDelete Process Define/Instance Outside for transactional#1260

Merged
qiaozhanwei merged 1 commit intoapache:dev-dbfrom
Baoqi:bwu_fix_batch_transaction_new
Nov 17, 2019
Merged

move batchDelete Process Define/Instance Outside for transactional#1260
qiaozhanwei merged 1 commit intoapache:dev-dbfrom
Baoqi:bwu_fix_batch_transaction_new

Conversation

@Baoqi
Copy link
Copy Markdown
Member

@Baoqi Baoqi commented Nov 17, 2019

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.

@qiaozhanwei qiaozhanwei merged commit 4ace8ef into apache:dev-db Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants