Merge branch 'refs/heads/feature/REQ-2596' into feature/merge-all

This commit is contained in:
yangqicheng 2024-07-30 10:08:19 +08:00
commit 129465f705

View File

@ -1,5 +1,6 @@
package cn.axzo.workflow.core.engine.job;
import cn.axzo.framework.domain.ServiceException;
import cn.axzo.workflow.core.common.utils.SpringContextUtils;
import cn.axzo.workflow.core.repository.entity.ExtAxProperty;
import cn.axzo.workflow.core.service.ExtAxPropertyService;
@ -31,6 +32,9 @@ public abstract class AbstractExecuteWithLockJobHandler extends AbstractJobHandl
if (acquireLock(processInstanceId, jobId)) {
log.info("job acquire lock success,processInstanceId:{},jobId:{}", processInstanceId, jobId);
executeInternal(job, configuration, variableScope, commandContext);
} else {
log.error("get lock failed,processInstanceId:{},jobId:{}", processInstanceId, jobId);
throw new ServiceException("acquire lock failed");
}
} finally {
releaseLock(processInstanceId, jobId);