feat: 构建结果群群机器人通知
This commit is contained in:
@@ -16,9 +16,9 @@ public class ProcessDefinitionController {
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
public Result<String> create(@RequestBody ProcessBo processBo) {
|
||||
processDefinitionFacade.create(processBo);
|
||||
return Result.ok();
|
||||
public Result<Long> create(@RequestBody ProcessBo processBo) {
|
||||
Long workflowId = processDefinitionFacade.create(processBo);
|
||||
return Result.ok(workflowId);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.metis.controller;
|
||||
import com.metis.flow.domain.bo.BuildApp;
|
||||
import com.metis.flow.engine.AppFlowEngineRunnerService;
|
||||
import com.metis.flow.runner.FlowRunningContext;
|
||||
import com.metis.flow.runner.RunnerResult;
|
||||
import com.metis.flow.validator.ValidatorService;
|
||||
import com.metis.result.Result;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -28,9 +29,9 @@ public class TestController {
|
||||
|
||||
|
||||
@PostMapping("/run")
|
||||
public Result<String> run(@RequestBody FlowRunningContext context) {
|
||||
engineRunnerService.running(context);
|
||||
return Result.ok("测试成功");
|
||||
public Result<RunnerResult> run(@RequestBody FlowRunningContext context) {
|
||||
RunnerResult running = engineRunnerService.running(context);
|
||||
return Result.ok(running);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,12 +21,13 @@ public class ProcessDefinitionFacade {
|
||||
*
|
||||
* @param processBo 过程业务对象
|
||||
*/
|
||||
public void create(ProcessBo processBo) {
|
||||
public Long create(ProcessBo processBo) {
|
||||
CreateApp createApp = CreateApp.builder()
|
||||
.name(processBo.getName())
|
||||
.graph(processBo.getGraph())
|
||||
.build();
|
||||
App app = appEngineService.create(createApp);
|
||||
return app.getWorkflowId();
|
||||
}
|
||||
|
||||
public App getByDeploymentId(Long deploymentId) {
|
||||
|
||||
Reference in New Issue
Block a user