package com.leanwo.activiti.config;

import java.util.ArrayList;
import java.util.List;

import org.activiti.bpmn.model.Task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.leanwo.activiti.dto.base.TaskDefineDto;
import com.leanwo.activiti.service.base.HttpTaskEngine;
import com.leanwo.activiti.service.base.impl.HttpTaskEngineImpl;

@Configuration
public class HttpTaskEngineConfiguration {

	private static Logger logger = LoggerFactory.getLogger(HttpTaskEngineConfiguration.class);

	@Value("${auto.http}")
	private Boolean http;

	@Bean(initMethod = "init")
	public HttpTaskEngine httpTaskEngine() {
		HttpTaskEngineImpl httpTaskEngineImpl = new HttpTaskEngineImpl(0L, http);
		return httpTaskEngineImpl;
	}

	@Bean
	public List<TaskDefineDto> httpTaskList() {
		List<TaskDefineDto> httpTaskList = new ArrayList<TaskDefineDto>();
		return httpTaskList;
	}
}
