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

com.redhat.parodos.examples.complex.task.NamespaceWorkFlowTask 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 NamespaceWorkFlowTask extends BaseInfrastructureWorkFlowTask {

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

	@Override
	public List getWorkFlowTaskParameters() {
		return List.of(WorkParameter.builder().key("projectId").description("The project id")
				.type(WorkParameterType.NUMBER).optional(false).build());
	}

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy