mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-11-12 20:23:50 +08:00
add 添加流程激活/挂起接口 升级warm-flow到1.2.4
This commit is contained in:
@@ -184,4 +184,19 @@ public class FlwDefinitionController extends BaseController {
|
||||
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;
|
||||
|
||||
import com.warm.flow.core.entity.Instance;
|
||||
import com.warm.flow.core.service.InsService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@@ -24,6 +25,7 @@ import java.util.List;
|
||||
public class FlwInstanceController extends BaseController {
|
||||
|
||||
private final IFlwInstanceService flwInstanceService;
|
||||
private final InsService insService;
|
||||
|
||||
/**
|
||||
* 分页查询正在运行的流程实例
|
||||
@@ -76,4 +78,19 @@ public class FlwInstanceController extends BaseController {
|
||||
public R<Void> cancelProcessApply(@PathVariable String 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user