feat(REQ-2616) - 完善Activity 节点的回调,以及定时触发功能逻辑
This commit is contained in:
parent
067ceecdba
commit
f2593e5330
@ -51,6 +51,9 @@ public class CustomBusinessNodeTimeoutCallbackCmd extends AbstractCommand<Void>
|
||||
ProcessEngineConfigurationImpl processEngineConfiguration =
|
||||
CommandContextUtil.getProcessEngineConfiguration(commandContext);
|
||||
ExecutionEntity executionEntity = (ExecutionEntity) processEngineConfiguration.getRuntimeService().createExecutionQuery().executionId(triggerId).singleResult();
|
||||
if (executionEntity == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String newEndTime = parseDateTimeWithTimeZone();
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 业务节点触发倒计时
|
||||
@ -51,7 +52,9 @@ public class CustomBusinessNodeTimeoutTriggerCmd extends AbstractCommand<Void> i
|
||||
ProcessEngineConfigurationImpl processEngineConfiguration =
|
||||
CommandContextUtil.getProcessEngineConfiguration(commandContext);
|
||||
ExecutionEntity executionEntity = (ExecutionEntity) processEngineConfiguration.getRuntimeService().createExecutionQuery().executionId(triggerId).singleResult();
|
||||
|
||||
if (Objects.isNull(executionEntity)) {
|
||||
return null;
|
||||
}
|
||||
String newEndTime = parseDateTimeWithTimeZone();
|
||||
|
||||
TimerEventDefinition timerEventDefinition = new TimerEventDefinition();
|
||||
|
||||
@ -56,7 +56,8 @@ public class ExtAxPropertyServiceImpl implements ExtAxPropertyService {
|
||||
}
|
||||
QueryWrapper<ExtAxProperty> queryWrapper = new QueryWrapper<ExtAxProperty>()
|
||||
.eq("name", name);
|
||||
return Optional.ofNullable(mapper.selectOne(queryWrapper));
|
||||
Optional<ExtAxProperty> extAxProperty = Optional.ofNullable(mapper.selectOne(queryWrapper));
|
||||
return extAxProperty;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -66,6 +66,7 @@ public class ErrorReportAspect implements Ordered {
|
||||
*/
|
||||
@Around(value = "@within(org.springframework.web.bind.annotation.RestController) || @within(org.springframework.stereotype.Service)")
|
||||
public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||
log.info("{}.{}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName());
|
||||
Signature signature = joinPoint.getSignature();
|
||||
StopWatch watch = new StopWatch("running controller time");
|
||||
watch.start(signature.toShortString());
|
||||
|
||||
@ -118,6 +118,7 @@ public class BpmnProcessActivityController implements ProcessActivityApi {
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/timeout/trigger")
|
||||
@Override
|
||||
public CommonResponse<Boolean> setTimeoutTrigger(BpmnActivityTimeoutTriggerDTO dto) {
|
||||
return CommonResponse.success(bpmnProcessActivityService.setTimeoutTrigger(dto));
|
||||
@ -129,6 +130,7 @@ public class BpmnProcessActivityController implements ProcessActivityApi {
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/timeout/callback")
|
||||
@Override
|
||||
public CommonResponse<Boolean> setTimeoutCallback(BpmnActivityTimeoutCallbackDTO dto) {
|
||||
return CommonResponse.success(bpmnProcessActivityService.setTimeOutCallback(dto));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user