2个执行对象撤回失败

需求:撤回操作,把活动id为BuyConfirm撤回到WaitForUpdate

操作:

runtimeService.createChangeActivityStateBuilder()
                    /.moveExecutionsToSingleActivityId()
                    /.moveExecutionToActivityId()
                    /.moveActivityIdTo()
                    /.moveActivityIdToSubProcessInstanceActivityId()
                    /.moveActivityIdToParentActivityId()
                    /.moveActivityIdsToSingleActivityId()
                    .changeState();

bug:外键约束,撤回失败

org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PARENT: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PARENT_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('5fc082e7-e32f-11e8-bb37-34e12deba98d')"; SQL statement:
delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ? [23503-197]
### The error may involve org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl.deleteExecution-Inline
### The error occurred while setting parameters
### SQL: delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ?
### Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PARENT: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PARENT_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_) ('5fc082e7-e32f-11e8-bb37-34e12deba98d')"; SQL statement:
delete from ACT_RU_EXECUTION where ID_ = ? and REV_ = ? [23503-197]
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.4.5.jar:3.4.5]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:200) ~[mybatis-3.4.5.jar:3.4.5]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:213) ~[mybatis-3.4.5.jar:3.4.5]
	at org.flowable.common.engine.impl.db.DbSqlSession.flushDeleteEntities(DbSqlSession.java:566) ~[flowable-engine-common-6.3.1.jar:6.3.1]
	at 

原因:同一流程实例下还有一个执行对象(对应的activity为ConfrimTimer),外键指向被移动的方法BuyConfirm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值