|
@@ -99,9 +99,30 @@ public class WorkflowController : BaseController
|
|
|
if (!pubRsp.IsSuccess) throw new UserFriendlyException(pubRsp.Error ?? string.Empty, "发布流程模板失败");
|
|
|
}
|
|
|
|
|
|
- [HttpPost("")]
|
|
|
+ /// <summary>
|
|
|
+ /// 启用流程模板
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="workflowId"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ /// <exception cref="UserFriendlyException"></exception>
|
|
|
+ [HttpPost("enable")]
|
|
|
public async Task Enable(string workflowId)
|
|
|
{
|
|
|
+ var enableRsp = await _workflowRemotingService.EnableAsync(workflowId, HttpContext.RequestAborted);
|
|
|
+ if (!enableRsp.IsSuccess) throw new UserFriendlyException(enableRsp.Error ?? string.Empty, "启用流程模板失败");
|
|
|
+ }
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 禁用流程模板
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="workflowId"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ /// <exception cref="UserFriendlyException"></exception>
|
|
|
+ [HttpPost("disable")]
|
|
|
+ public async Task Disable(string workflowId)
|
|
|
+ {
|
|
|
+ var disableRsp = await _workflowRemotingService.DisableAsync(workflowId, HttpContext.RequestAborted);
|
|
|
+ if (!disableRsp.IsSuccess) throw new UserFriendlyException(disableRsp.Error ?? string.Empty, "禁用流程模板失败");
|
|
|
}
|
|
|
+
|
|
|
}
|