add 添加流程激活/挂起接口 升级warm-flow到1.2.4
This commit is contained in:
parent
0195163181
commit
3adf918067
2
pom.xml
2
pom.xml
@ -53,7 +53,7 @@
|
|||||||
<!-- 面向运行时的D-ORM依赖 -->
|
<!-- 面向运行时的D-ORM依赖 -->
|
||||||
<anyline.version>8.7.2-20240808</anyline.version>
|
<anyline.version>8.7.2-20240808</anyline.version>
|
||||||
<!--工作流配置-->
|
<!--工作流配置-->
|
||||||
<warm-flow>1.2.3</warm-flow>
|
<warm-flow>1.2.4</warm-flow>
|
||||||
|
|
||||||
<!-- 插件版本 -->
|
<!-- 插件版本 -->
|
||||||
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
|
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
|
||||||
|
@ -184,4 +184,19 @@ public class FlwDefinitionController extends BaseController {
|
|||||||
return R.ok(defService.flowChart(instanceId));
|
return R.ok(defService.flowChart(instanceId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 激活/挂起流程定义
|
||||||
|
*
|
||||||
|
* @param id 流程定义id
|
||||||
|
* @param active 激活/挂起
|
||||||
|
*/
|
||||||
|
@PutMapping("/updateDefinitionState/{id}/{active}")
|
||||||
|
public R<Boolean> active(@PathVariable Long id, @PathVariable boolean active) {
|
||||||
|
if (active) {
|
||||||
|
return R.ok(defService.unActive(id));
|
||||||
|
} else {
|
||||||
|
return R.ok(defService.active(id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.dromara.workflow.controller;
|
package org.dromara.workflow.controller;
|
||||||
|
|
||||||
import com.warm.flow.core.entity.Instance;
|
import com.warm.flow.core.entity.Instance;
|
||||||
|
import com.warm.flow.core.service.InsService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
@ -24,6 +25,7 @@ import java.util.List;
|
|||||||
public class FlwInstanceController extends BaseController {
|
public class FlwInstanceController extends BaseController {
|
||||||
|
|
||||||
private final IFlwInstanceService flwInstanceService;
|
private final IFlwInstanceService flwInstanceService;
|
||||||
|
private final InsService insService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询正在运行的流程实例
|
* 分页查询正在运行的流程实例
|
||||||
@ -76,4 +78,19 @@ public class FlwInstanceController extends BaseController {
|
|||||||
public R<Void> cancelProcessApply(@PathVariable String businessId) {
|
public R<Void> cancelProcessApply(@PathVariable String businessId) {
|
||||||
return toAjax(flwInstanceService.cancelProcessApply(businessId));
|
return toAjax(flwInstanceService.cancelProcessApply(businessId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 激活/挂起流程定义
|
||||||
|
*
|
||||||
|
* @param id 流程定义id
|
||||||
|
* @param active 激活/挂起
|
||||||
|
*/
|
||||||
|
@PutMapping("/active/{id}/{active}")
|
||||||
|
public R<Boolean> active(@PathVariable Long id, @PathVariable boolean active) {
|
||||||
|
if (active) {
|
||||||
|
return R.ok(insService.unActive(id));
|
||||||
|
} else {
|
||||||
|
return R.ok(insService.active(id));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user