fix:报告流程回调优化
This commit is contained in:
@@ -8,6 +8,8 @@ import com.zt.plat.module.qms.enums.ErrorCodeConstants;
|
|||||||
import com.zt.plat.module.qms.enums.QmsBpmConstant;
|
import com.zt.plat.module.qms.enums.QmsBpmConstant;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.flowable.bpmn.model.FieldExtension;
|
||||||
|
import org.flowable.bpmn.model.FlowableListener;
|
||||||
import org.flowable.engine.RuntimeService;
|
import org.flowable.engine.RuntimeService;
|
||||||
import org.flowable.engine.delegate.DelegateExecution;
|
import org.flowable.engine.delegate.DelegateExecution;
|
||||||
import org.flowable.engine.delegate.JavaDelegate;
|
import org.flowable.engine.delegate.JavaDelegate;
|
||||||
@@ -15,6 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
||||||
@@ -39,9 +42,11 @@ public class QmsExecutionListener implements JavaDelegate {
|
|||||||
JSONObject jsonObject = new JSONObject(variables);
|
JSONObject jsonObject = new JSONObject(variables);
|
||||||
String insId = execution.getProcessInstanceId();
|
String insId = execution.getProcessInstanceId();
|
||||||
String businessKey = execution.getProcessInstanceBusinessKey();
|
String businessKey = execution.getProcessInstanceBusinessKey();
|
||||||
|
FlowableListener listener = execution.getCurrentFlowableListener();
|
||||||
|
List<FieldExtension> fieldExtensions = listener.getFieldExtensions(); //节点执行监听里配置的扩展字段
|
||||||
String currentActivityId = execution.getCurrentActivityId();
|
String currentActivityId = execution.getCurrentActivityId();
|
||||||
jsonObject.put(QmsBpmConstant.BPM_CALLBACK_ACTIVITY_ID, currentActivityId);
|
jsonObject.put(QmsBpmConstant.BPM_CALLBACK_ACTIVITY_ID, currentActivityId);
|
||||||
|
jsonObject.put(QmsBpmConstant.BPM_FIELD_EXTENSIONS, fieldExtensions);
|
||||||
QmsBpmDTO qmsBpmDTO = new QmsBpmDTO(insId, businessKey, jsonObject, "");
|
QmsBpmDTO qmsBpmDTO = new QmsBpmDTO(insId, businessKey, jsonObject, "");
|
||||||
Map<String, Object> v = runtimeService.getVariables(execution.getProcessInstanceId());
|
Map<String, Object> v = runtimeService.getVariables(execution.getProcessInstanceId());
|
||||||
// Object status = runtimeService.getVariable(execution.getProcessInstanceId(), WfProcessConstant.TASK_VARIABLE_PROCESS_TERMINATE);
|
// Object status = runtimeService.getVariable(execution.getProcessInstanceId(), WfProcessConstant.TASK_VARIABLE_PROCESS_TERMINATE);
|
||||||
|
|||||||
Reference in New Issue
Block a user