提交 c4f13d71 编写于 作者: tangyaolong's avatar tangyaolong

回退改名

上级 7ea4cb76
......@@ -1919,7 +1919,7 @@ public class WFCoreService
* @param taskId 当前需要回退的节点
* @return 回退上一个节点
*/
public boolean wfback(String taskId) {
public boolean sendBack(String taskId) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
String taskDefinitionKey = task.getTaskDefinitionKey();
if (taskDefinitionKey == null) {
......@@ -1933,7 +1933,7 @@ public class WFCoreService
}
List<HistoricTaskInstance> history = historyService.createHistoricTaskInstanceQuery().processInstanceId(processInstanceId).orderByHistoricTaskInstanceEndTime().desc().list();
if(ObjectUtils.isEmpty(history)){
throw new BadRequestAlertException("暂无流程数据","WFCoreService","wfback");
throw new BadRequestAlertException("暂无流程数据","WFCoreService","sendBack");
}
HistoricTaskInstance sourceRef = history.get(0);
// 执行回退
......
......@@ -149,10 +149,10 @@ public class WFCoreResource
return ResponseEntity.ok(wfCoreService.wfsubmit(system,appname,entity,businessKey,taskId,taskWay));
}
@ApiOperation(value = "wfback", tags = {"wfback" }, notes = "工作流回退")
@RequestMapping(method = RequestMethod.POST, value = "/{taskId}/back")
public ResponseEntity<Boolean> wfback(@PathVariable("taskId") String taskId){
return ResponseEntity.ok(wfCoreService.wfback(taskId));
@ApiOperation(value = "sendback", tags = {"sendback" }, notes = "流程步骤回退")
@RequestMapping(method = RequestMethod.POST, value = "/{system}-app-{appname}/{entity}/{businessKey}/tasks/{taskId}/sendback")
public ResponseEntity<Boolean> sendback(@PathVariable("taskId") String taskId){
return ResponseEntity.ok(wfCoreService.sendBack(taskId));
}
//@PreAuthorize("hasPermission(#entity,'WFSTART',this.getEntity())")
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册