com.redhat.parodos.examples.complex.task.SingleSignOnWorkFlowTask 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 SingleSignOnWorkFlowTask extends BaseInfrastructureWorkFlowTask {
@Override
public WorkReport execute(WorkContext workContext) {
log.info("SingleSignOnWorkFlowTask");
return new DefaultWorkReport(WorkStatus.COMPLETED, workContext);
}
@Override
public List getWorkFlowTaskParameters() {
return List.of(
WorkParameter.builder().key("userId").description("The user id").type(WorkParameterType.TEXT)
.optional(false).build(),
WorkParameter.builder().key("password").description("The password").type(WorkParameterType.PASSWORD)
.optional(false).build());
}
@Override
public List getWorkFlowTaskOutputs() {
return List.of(WorkFlowTaskOutput.OTHER);
}
}