package com.njcn.process.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.process.api.fallback.FlowableDefineFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 工作流
 * @author cdf
 * @date 2023/4/13
 */
@FeignClient(value = ServerInfo.PROCESS,path = "/flowable/definition",fallbackFactory = FlowableDefineFallbackFactory.class)
public interface FlowableDefineFeignClient {



    @PostMapping("/start")
    HttpResult<String> start(@RequestParam(value = "procDefId") String procDefId,
                              @RequestParam("thsIndex") String thsIndex,
                              @RequestBody Map<String, Object> variables);
}
