update - 添加撤销功能命令器
This commit is contained in:
parent
e31f65ff3c
commit
8acd8fe76a
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -21,7 +22,8 @@ public class BpmnProcessInstanceCancelDTO {
|
|||||||
/**
|
/**
|
||||||
* 流程实例的编号
|
* 流程实例的编号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "流程实例编号", example = "11", notes = "与 businessKey 必须二选一")
|
@ApiModelProperty(value = "流程实例编号", example = "11")
|
||||||
|
@NotBlank(message = "流程实例编号不能为空")
|
||||||
private String processInstanceId;
|
private String processInstanceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -23,7 +23,7 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.ELEMENT_ATTRIBUTE_V
|
|||||||
import static org.flowable.bpmn.model.ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION;
|
import static org.flowable.bpmn.model.ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务任务节点
|
* 服务任务节点, 目前这个类型主要用来做抄送功能
|
||||||
*
|
*
|
||||||
* @author wangli
|
* @author wangli
|
||||||
* @since 2023/10/17 15:47
|
* @since 2023/10/17 15:47
|
||||||
@ -38,8 +38,7 @@ public class ServiceTaskJsonConverter extends AbstractBpmnJsonConverter<ServiceT
|
|||||||
// 设置抄送具体的实现类
|
// 设置抄送具体的实现类
|
||||||
setCarbonCopyDelegate(serviceTask);
|
setCarbonCopyDelegate(serviceTask);
|
||||||
|
|
||||||
// setExecutionListeners(serviceTask);
|
// 持久化节点抄送配置元数据
|
||||||
|
|
||||||
setCarbonCopyExtensionElement(node, serviceTask);
|
setCarbonCopyExtensionElement(node, serviceTask);
|
||||||
return serviceTask;
|
return serviceTask;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -83,8 +83,8 @@ public class CustomCancelProcessInstanceCmd implements Command<Void>, Serializab
|
|||||||
|
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put(INTERNAL_END_TENANT_ID, tenantId);
|
variables.put(INTERNAL_END_TENANT_ID, tenantId);
|
||||||
variables.put(INTERNAL_END_USER_ID, "system");
|
variables.put(INTERNAL_END_USER_ID, initiator.buildAssigneeId());
|
||||||
variables.put(INTERNAL_END_USER_NAME, "系统");
|
variables.put(INTERNAL_END_USER_NAME, initiator.getAssignerName());
|
||||||
variables.put(INTERNAL_DELETE_PROCESS_FLAG, INTERNAL_PROCESS_TYPE_CANCEL);
|
variables.put(INTERNAL_DELETE_PROCESS_FLAG, INTERNAL_PROCESS_TYPE_CANCEL);
|
||||||
RuntimeService runtimeService = processEngineConfiguration.getRuntimeService();
|
RuntimeService runtimeService = processEngineConfiguration.getRuntimeService();
|
||||||
runtimeService.setVariables(instance.getId(), variables);
|
runtimeService.setVariables(instance.getId(), variables);
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static cn.axzo.workflow.core.engine.event.MessagePushEventType.CARBON_COPY;
|
||||||
import static cn.axzo.workflow.core.engine.event.MessagePushEventType.NOTICE;
|
import static cn.axzo.workflow.core.engine.event.MessagePushEventType.NOTICE;
|
||||||
import static cn.axzo.workflow.core.engine.event.MessagePushEventType.PENDING_COMPLETE;
|
import static cn.axzo.workflow.core.engine.event.MessagePushEventType.PENDING_COMPLETE;
|
||||||
import static cn.axzo.workflow.core.engine.event.MessagePushEventType.PENDING_PUSH;
|
import static cn.axzo.workflow.core.engine.event.MessagePushEventType.PENDING_PUSH;
|
||||||
@ -39,6 +40,7 @@ public class EngineNoticeEventListener extends AbstractFlowableEventListener {
|
|||||||
.add(NOTICE)
|
.add(NOTICE)
|
||||||
.add(PENDING_PUSH)
|
.add(PENDING_PUSH)
|
||||||
.add(PENDING_COMPLETE)
|
.add(PENDING_COMPLETE)
|
||||||
|
.add(CARBON_COPY)
|
||||||
.add(SMS)
|
.add(SMS)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
@ -70,6 +72,12 @@ public class EngineNoticeEventListener extends AbstractFlowableEventListener {
|
|||||||
stopWatch.stop();
|
stopWatch.stop();
|
||||||
log.info("PUSH-PENDING-COMPLETE StopWatch : running time = " + stopWatch.getTotalTimeSeconds() + " 's");
|
log.info("PUSH-PENDING-COMPLETE StopWatch : running time = " + stopWatch.getTotalTimeSeconds() + " 's");
|
||||||
break;
|
break;
|
||||||
|
case CARBON_COPY:
|
||||||
|
stopWatch.start("CARBON-COPY Event Execution Time");
|
||||||
|
getOrderedListeners().forEach(i -> i.onCarbonCopy(event));
|
||||||
|
stopWatch.stop();
|
||||||
|
log.info("CARBON-COPY StopWatch : running time = " + stopWatch.getTotalTimeSeconds() + " 's");
|
||||||
|
break;
|
||||||
case SMS:
|
case SMS:
|
||||||
stopWatch.start("SMS Event Execution Time");
|
stopWatch.start("SMS Event Execution Time");
|
||||||
getOrderedListeners().forEach(i -> i.onSms(event));
|
getOrderedListeners().forEach(i -> i.onSms(event));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user