package com.jeelowcode.service.bpm.api;

import com.jeelowcode.service.bpm.dto.BpmProcessInstanceCreateReqDTO;
import com.jeelowcode.service.bpm.service.IBpmProcessInstanceService;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * Flowable 流程实例 Api 实现类
 *
 * @author 芋道源码
 * @author jason
 */
@Service
@Validated
public class ApiBpmProcessInstanceApiImpl implements IApiBpmProcessInstanceApi {

    @Resource
    private IBpmProcessInstanceService processInstanceService;

    @Override
    public String createProcessInstance(Long userId, @Valid BpmProcessInstanceCreateReqDTO reqDTO) {
        return processInstanceService.createProcessInstance(userId, reqDTO);
    }
}
