潘志宝
2024-12-03 51c1c2c9fa28fb1765dd6e81c70b78566792aebe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.iailab.module.bpm.api.task;
 
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
import com.iailab.module.bpm.service.task.BpmProcessInstanceService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import javax.validation.Valid;
 
import static com.iailab.framework.common.pojo.CommonResult.success;
 
/**
 * Flowable 流程实例 Api 实现类
 *
 * @author iailab
 * @author jason
 */
@RestController
@Validated
public class BpmProcessInstanceApiImpl implements BpmProcessInstanceApi {
 
    @Resource
    private BpmProcessInstanceService processInstanceService;
 
    @Override
    public CommonResult<String> createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO reqDTO) {
        return success(processInstanceService.createProcessInstance(userId, reqDTO));
    }
 
}