package com.leanwo.activiti.service.base.impl;

import java.util.List;

import javax.inject.Inject;
import javax.inject.Named;

import com.leanwo.activiti.dto.BaseResponse;
import com.leanwo.activiti.dto.base.TaskDefineDto;
import com.leanwo.activiti.dto.base.TaskInstanceSaveRequest;
import com.leanwo.activiti.dto.base.TaskInstanceUpdateRequest;
import com.leanwo.activiti.dto.base.TaskType;
import com.leanwo.activiti.service.base.TaskDefineService;

@Named
public class TaskDefineServiceImpl implements TaskDefineService {

	@Inject
	private ProdogServer prodogServer;

	@Override
	public List<TaskDefineDto> list(TaskType taskType) {
		return prodogServer.listTaskDefine(taskType);
	}

	@Override
	public BaseResponse addTaskInstance(TaskInstanceSaveRequest taskInstanceSaveRequest) {
		return prodogServer.addTaskInstance(taskInstanceSaveRequest);
	}

	@Override
	public BaseResponse updateTaskInstance(TaskInstanceUpdateRequest taskInstanceUpdateRequest) {
		return prodogServer.updateTaskInstance(taskInstanceUpdateRequest);
	}

}
