All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redhat.parodos.examples.complex.task.LoadBalancerWorkFlowTask Maven / Gradle / Ivy

package com.redhat.parodos.examples.complex.task;

import java.util.List;

import com.redhat.parodos.workflow.parameter.WorkParameter;
import com.redhat.parodos.workflow.parameter.WorkParameterType;
import com.redhat.parodos.workflow.task.enums.WorkFlowTaskOutput;
import com.redhat.parodos.workflow.task.infrastructure.BaseInfrastructureWorkFlowTask;
import com.redhat.parodos.workflows.work.DefaultWorkReport;
import com.redhat.parodos.workflows.work.WorkContext;
import com.redhat.parodos.workflows.work.WorkReport;
import com.redhat.parodos.workflows.work.WorkStatus;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class LoadBalancerWorkFlowTask extends BaseInfrastructureWorkFlowTask {

	@Override
	public WorkReport execute(WorkContext workContext) {
		log.info("LoadBalancerWorkFlowTask");
		return new DefaultWorkReport(WorkStatus.COMPLETED, workContext);
	}

	@Override
	public List getWorkFlowTaskParameters() {
		return List.of(
				WorkParameter.builder().key("hostname").description("The hostname").type(WorkParameterType.URL)
						.optional(false).build(),
				WorkParameter.builder().key("appId").description("The app id").type(WorkParameterType.TEXT)
						.optional(false).build());
	}

	@Override
	public List getWorkFlowTaskOutputs() {
		return List.of(WorkFlowTaskOutput.HTTP2XX);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy