Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Remove unused tasks and replace used with prebuilt tasks #435

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.redhat.parodos.flows;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;

Expand Down Expand Up @@ -48,8 +47,9 @@ public void runSimpleWorkFlow() throws ApiException, InterruptedException {
// Define WorkRequests
WorkRequestDTO work1 = new WorkRequestDTO();
work1.setWorkName("restCallTask");
work1.setArguments(Collections
.singletonList(new ArgumentRequestDTO().key("url").value("http://localhost:8080/actuator/health")));
work1.setArguments(
Arrays.asList(new ArgumentRequestDTO().key("url").value("http://localhost:8080/actuator/health"),
new ArgumentRequestDTO().key("method").value("get")));

WorkRequestDTO work2 = new WorkRequestDTO();
work2.setWorkName("loggingTask");
Expand Down
4 changes: 4 additions & 0 deletions workflow-examples/run_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ run_simple_flow() {
{
"key": "url",
"value": "http://localhost:8080/actuator/health"
},
{
"key": "method",
"value": "get"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.concurrent.Executors;

import com.redhat.parodos.examples.simple.task.LoggingWorkFlowTask;
import com.redhat.parodos.examples.simple.task.RestAPIWorkFlowTask;
import com.redhat.parodos.tasks.rest.RestWorkFlowTask;
import com.redhat.parodos.workflow.annotation.Infrastructure;
import com.redhat.parodos.workflow.annotation.WorkFlowProperties;
import com.redhat.parodos.workflow.consts.WorkFlowConstants;
Expand All @@ -45,8 +45,8 @@ public class SimpleWorkFlowConfiguration {

// START Sequential Example (WorkflowTasks and Workflow Definitions)
@Bean
RestAPIWorkFlowTask restCallTask() {
return new RestAPIWorkFlowTask();
RestWorkFlowTask restCallTask() {
return new RestWorkFlowTask();
}

@Bean
Expand All @@ -57,7 +57,7 @@ LoggingWorkFlowTask loggingTask() {
@Bean(name = "simpleSequentialWorkFlow" + WorkFlowConstants.INFRASTRUCTURE_WORKFLOW)
@Infrastructure
@WorkFlowProperties(version = "${git.commit.id}")
WorkFlow simpleSequentialWorkFlowTask(@Qualifier("restCallTask") RestAPIWorkFlowTask restCallTask,
WorkFlow simpleSequentialWorkFlowTask(@Qualifier("restCallTask") RestWorkFlowTask restCallTask,
@Qualifier("loggingTask") LoggingWorkFlowTask loggingTask) {
// @formatter:off
return SequentialFlow
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading