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

Commit

Permalink
Remove unused tasks and replace used with prebuilt tasks
Browse files Browse the repository at this point in the history
FLPATH-291 https://issues.redhat.com/browse/FLPATH-291

Signed-off-by: Yaron Dayagi <ydayagi@redhat.com>
  • Loading branch information
ydayagi committed Jun 26, 2023
1 parent d2bb67f commit 371437b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 472 deletions.
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

0 comments on commit 371437b

Please sign in to comment.