类 InterfaceUtilService


  • @EnableAsync
    @Service("interfaceUtilService")
    public class InterfaceUtilService
    extends Object
    作者:
    zhangchongjie
    Date:
    2024/05/29
    • 构造器详细资料

      • InterfaceUtilService

        public InterfaceUtilService​(net.risesoft.api.itemadmin.ProcessParamApi processParamApi,
                                    net.risesoft.api.itemadmin.ErrorLogApi errorLogApi,
                                    net.risesoft.api.itemadmin.ItemInterfaceApi itemInterfaceApi)
    • 方法详细资料

      • asynInterface

        @Async
        public Future<Boolean> asynInterface​(String tenantId,
                                             String orgUnitId,
                                             String processSerialNumber,
                                             String itemId,
                                             net.risesoft.model.itemadmin.InterfaceModel info,
                                             String processInstanceId,
                                             String taskId,
                                             String taskKey)
        异步调用接口
        参数:
        tenantId - 租户id 租户ID
        processInstanceId - 流程实例id 流程实例ID
        itemId - 接口ID
        info - 接口信息
        返回:
        Boolean
      • dataHandling

        public void dataHandling​(String processSerialNumber,
                                 String processInstanceId,
                                 Map<String,​Object> map,
                                 List<net.risesoft.model.itemadmin.InterfaceParamsModel> paramsList,
                                 net.risesoft.model.itemadmin.InterfaceModel info)
                          throws Exception
        接口响应数据处理
        参数:
        processSerialNumber - 流程编号
        processInstanceId - 流程实例id 流程实例ID
        map -
        paramsList -
        info -
        抛出:
        Exception
      • getMethod

        public void getMethod​(String processSerialNumber,
                              String itemId,
                              net.risesoft.model.itemadmin.InterfaceModel info,
                              String processInstanceId,
                              String taskId,
                              String taskKey)
                       throws Exception
        get方法调用接口
        参数:
        processSerialNumber -
        itemId -
        info -
        processInstanceId - 流程实例id
        taskId - 任务id
        taskKey - 任务key
        抛出:
        Exception
      • getRequestParams

        public List<Map<String,​Object>> getRequestParams​(List<net.risesoft.model.itemadmin.InterfaceParamsModel> list,
                                                               String processSerialNumber,
                                                               String processInstanceId,
                                                               net.risesoft.model.itemadmin.InterfaceModel info)
                                                        throws Exception
        获取请求参数值
        参数:
        list -
        processSerialNumber -
        processInstanceId - 流程实例id
        info -
        返回:
        抛出:
        Exception
      • interfaceCallByProcess

        public void interfaceCallByProcess​(org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl executionEntity,
                                           Map<String,​Object> variables,
                                           String condition)
                                    throws Exception
        流程启动,办结接口调用
        参数:
        executionEntity -
        variables -
        condition -
        抛出:
        Exception
      • interfaceCallBySequenceFlow

        public void interfaceCallBySequenceFlow​(org.flowable.engine.delegate.event.impl.FlowableSequenceFlowTakenEventImpl flow,
                                                String condition)
                                         throws Exception
        路由经过接口调用
        参数:
        flow -
        condition -
        抛出:
        Exception
      • interfaceCallByTask

        public void interfaceCallByTask​(org.flowable.task.service.delegate.DelegateTask task,
                                        Map<String,​Object> variables,
                                        String condition)
                                 throws Exception
        任务创建,完成接口调用
        参数:
        task -
        variables -
        condition -
        抛出:
        Exception
      • postMethod

        public void postMethod​(String processSerialNumber,
                               String itemId,
                               net.risesoft.model.itemadmin.InterfaceModel info,
                               String processInstanceId,
                               String taskId,
                               String taskKey)
                        throws Exception
        post方法调用接口
        参数:
        processSerialNumber -
        itemId -
        info -
        processInstanceId - 流程实例id
        taskId - 任务id
        taskKey - 任务key
        抛出:
        Exception
      • saveErrorLog

        @Async
        public Future<Boolean> saveErrorLog​(String tenantId,
                                            String processInstanceId,
                                            String taskId,
                                            String taskKey,
                                            String interfaceAddress,
                                            String msg)
        保存错误日志
        参数:
        tenantId - 租户id
        processInstanceId - 流程实例id
        taskId - 任务id
        taskKey - 任务key
        interfaceAddress - 接口地址
        msg -
        返回:
      • syncInterface

        public void syncInterface​(String processSerialNumber,
                                  String itemId,
                                  net.risesoft.model.itemadmin.InterfaceModel info,
                                  String processInstanceId,
                                  String taskId,
                                  String taskKey)
                           throws Exception
        同步调用接口
        参数:
        processSerialNumber - 流程编号
        itemId - 事项id
        info - 接口信息
        processInstanceId - 流程实例id
        taskId - 任务id
        taskKey - 任务key
        抛出:
        Exception