update 优化 后端发起流程增加扩展表对象

This commit is contained in:
疯狂的狮子Li
2025-09-24 16:58:12 +08:00
parent 057e3540a9
commit 49b1d65af7
5 changed files with 103 additions and 0 deletions

View File

@@ -85,4 +85,22 @@ public interface RemoteWorkflowService {
*/
boolean completeTask(RemoteCompleteTask completeTask);
/**
* 办理任务
*
* @param taskId 任务ID
* @param message 办理意见
* @return 结果
*/
boolean completeTask(Long taskId, String message);
/**
* 启动流程并办理第一个任务
*
* @param startProcess 参数
* @return 结果
*/
boolean startCompleteTask(RemoteStartProcess startProcess);
}

View File

@@ -0,0 +1,45 @@
package org.dromara.workflow.api.domain;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 流程实例业务扩展对象
*
* @author may
* @date 2025-08-05
*/
@Data
public class RemoteFlowInstanceBizExt implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 流程实例ID
*/
private Long instanceId;
/**
* 业务ID
*/
private String businessId;
/**
* 业务编码
*/
private String businessCode;
/**
* 业务标题
*/
private String businessTitle;
}

View File

@@ -1,6 +1,7 @@
package org.dromara.workflow.api.domain;
import cn.hutool.core.util.ObjectUtil;
import lombok.Data;
import java.io.Serial;
@@ -40,6 +41,11 @@ public class RemoteStartProcess implements Serializable {
*/
private Map<String, Object> variables;
/**
* 流程业务扩展信息
*/
private RemoteFlowInstanceBizExt bizExt;
public Map<String, Object> getVariables() {
if (variables == null) {
return new HashMap<>(16);
@@ -47,4 +53,12 @@ public class RemoteStartProcess implements Serializable {
variables.entrySet().removeIf(entry -> Objects.isNull(entry.getValue()));
return variables;
}
public RemoteFlowInstanceBizExt getBizExt() {
if (ObjectUtil.isNull(bizExt)) {
bizExt = new RemoteFlowInstanceBizExt();
}
return bizExt;
}
}