Commit fda6aff8af3a9faa85736d99bca4a7c42a924b2e
1 parent
a42ad08b
【功能优化】 异步 http 请求触发器外部回调 controller 接口
Showing
1 changed file
with
9 additions
and
0 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmProcessInstanceController.java
| ... | ... | @@ -22,6 +22,7 @@ import io.swagger.v3.oas.annotations.Operation; |
| 22 | 22 | import io.swagger.v3.oas.annotations.Parameter; |
| 23 | 23 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 24 | 24 | import jakarta.annotation.Resource; |
| 25 | +import jakarta.annotation.security.PermitAll; | |
| 25 | 26 | import jakarta.validation.Valid; |
| 26 | 27 | import org.flowable.engine.history.HistoricProcessInstance; |
| 27 | 28 | import org.flowable.engine.repository.ProcessDefinition; |
| ... | ... | @@ -179,4 +180,12 @@ public class BpmProcessInstanceController { |
| 179 | 180 | return success(processInstanceService.getProcessInstanceBpmnModelView(id)); |
| 180 | 181 | } |
| 181 | 182 | |
| 183 | + @PostMapping("/http-trigger/callback") | |
| 184 | + @Operation(summary = "异步 HTTP 请求触发器回调") | |
| 185 | + @PermitAll // 允许外部调用,不需要登录。 TODO @芋艿 需要加一下验证签名吗? | |
| 186 | + public CommonResult<Boolean> httpTriggerCallback(@Valid @RequestBody BpmHttpTriggerCallbackReqVO reqVO) { | |
| 187 | + taskService.triggerReceiveTask(reqVO.getId(), reqVO.getCallbackId()); | |
| 188 | + return success(true); | |
| 189 | + } | |
| 190 | + | |
| 182 | 191 | } | ... | ... |