package com.mortals.xhx.feign.flowable;

import com.mortals.xhx.feign.IFeign;
import com.mortals.xhx.feign.req.BaseFlowReq;
import com.mortals.xhx.feign.req.BaseQuery;
import com.mortals.xhx.feign.req.DefinitionReq;
import com.mortals.xhx.feign.rsp.ApiResp;
import com.mortals.xhx.feign.rsp.DefinitionDeployRsp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 工作流程访问
 *
 * @author: zxfei
 * @date: 2021/8/31 9:34
 */
@FeignClient(name = "workflow-manager",path = "/m")
public interface IApiFlowDefinitionFeign extends IFeign {

    /**
     * 流程部署列表查询
     *
     * @param req
     * @return
     */
    @PostMapping("/api/definition/deploy/list")
    ApiResp<DefinitionDeployRsp> deploymentsList(@RequestBody BaseFlowReq<BaseQuery> req);


    /**
     * 激活或挂起流程定义(已经部署)
     *
     * @param req
     * @return
     */
    @PostMapping("/api/definition/deploy/updateState")
    ApiResp<String> updateState(@RequestBody DefinitionReq req);

    /**
     * 激活或挂起流程定义(已经部署)
     *
     * @param req
     * @return
     */
    @PostMapping("/api/definition/deploy/readXml")
    ApiResp<String> readXml(@RequestBody DefinitionReq req);





}