package org.sky.flow.core.feign;

import org.sky.core.tool.api.R;
import org.sky.flow.core.pojo.entity.KdFlow;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 流程远程调用失败处理类
 *
 */
@Component
public class IFlowClientFallback implements IFlowClient {

	@Override
	public R<KdFlow> startProcessInstanceById(String processDefinitionId, String businessKey, Map<String, Object> variables) {
		return R.fail("远程调用失败");
	}

	@Override
	public R<KdFlow> startProcessInstanceByKey(String processDefinitionKey, String businessKey, Map<String, Object> variables) {
		return R.fail("远程调用失败");
	}

	@Override
	public R completeTask(String taskId, String processInstanceId, String comment, Map<String, Object> variables) {
		return R.fail("远程调用失败");
	}

	@Override
	public R<Object> taskVariable(String taskId, String variableName) {
		return R.fail("远程调用失败");
	}

	@Override
	public R<Map<String, Object>> taskVariables(String taskId) {
		return R.fail("远程调用失败");
	}

}
