diff --git a/common/src/main/java/com/netflix/conductor/common/metadata/tasks/TaskDef.java b/common/src/main/java/com/netflix/conductor/common/metadata/tasks/TaskDef.java
index 7cf456caf3..29b57e3b3c 100644
--- a/common/src/main/java/com/netflix/conductor/common/metadata/tasks/TaskDef.java
+++ b/common/src/main/java/com/netflix/conductor/common/metadata/tasks/TaskDef.java
@@ -1,14 +1,14 @@
/*
- * Copyright 2020 Netflix, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
- * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
+ * Copyright 2021 Netflix, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
*/
package com.netflix.conductor.common.metadata.tasks;
@@ -90,24 +90,24 @@ public enum RetryLogic {FIXED, EXPONENTIAL_BACKOFF}
// @ProtoField(id = 13)
// private Integer rateLimitPerSecond;
- @ProtoField(id = 14)
+ @ProtoField(id = 14)
private Integer rateLimitPerFrequency;
- @ProtoField(id = 15)
+ @ProtoField(id = 15)
private Integer rateLimitFrequencyInSeconds;
- @ProtoField(id = 16)
+ @ProtoField(id = 16)
private String isolationGroupId;
- @ProtoField(id = 17)
+ @ProtoField(id = 17)
private String executionNameSpace;
- @ProtoField(id = 18)
+ @ProtoField(id = 18)
@OwnerEmailMandatoryConstraint
@Email(message = "ownerEmail should be valid email address")
private String ownerEmail;
- @ProtoField(id = 19)
+ @ProtoField(id = 19)
@Min(value = 0, message = "TaskDef pollTimeoutSeconds: {value} must be >= 0")
private Integer pollTimeoutSeconds;
@@ -131,7 +131,7 @@ public TaskDef(String name, String description, int retryCount, long timeoutSeco
}
public TaskDef(String name, String description, String ownerEmail, int retryCount,
- long timeoutSeconds, long responseTimeoutSeconds) {
+ long timeoutSeconds, long responseTimeoutSeconds) {
this.name = name;
this.description = description;
this.ownerEmail = ownerEmail;
@@ -411,29 +411,29 @@ public boolean equals(Object o) {
}
TaskDef taskDef = (TaskDef) o;
return getRetryCount() == taskDef.getRetryCount() &&
- getTimeoutSeconds() == taskDef.getTimeoutSeconds() &&
- getRetryDelaySeconds() == taskDef.getRetryDelaySeconds() &&
- getResponseTimeoutSeconds() == taskDef.getResponseTimeoutSeconds() &&
- Objects.equals(getName(), taskDef.getName()) &&
- Objects.equals(getDescription(), taskDef.getDescription()) &&
- Objects.equals(getInputKeys(), taskDef.getInputKeys()) &&
- Objects.equals(getOutputKeys(), taskDef.getOutputKeys()) &&
- getTimeoutPolicy() == taskDef.getTimeoutPolicy() &&
- getRetryLogic() == taskDef.getRetryLogic() &&
- Objects.equals(getConcurrentExecLimit(), taskDef.getConcurrentExecLimit()) &&
- Objects.equals(getRateLimitPerFrequency(), taskDef.getRateLimitPerFrequency()) &&
- Objects.equals(getInputTemplate(), taskDef.getInputTemplate()) &&
- Objects.equals(getIsolationGroupId(), taskDef.getIsolationGroupId()) &&
- Objects.equals(getExecutionNameSpace(), taskDef.getExecutionNameSpace()) &&
- Objects.equals(getOwnerEmail(), taskDef.getOwnerEmail());
+ getTimeoutSeconds() == taskDef.getTimeoutSeconds() &&
+ getRetryDelaySeconds() == taskDef.getRetryDelaySeconds() &&
+ getResponseTimeoutSeconds() == taskDef.getResponseTimeoutSeconds() &&
+ Objects.equals(getName(), taskDef.getName()) &&
+ Objects.equals(getDescription(), taskDef.getDescription()) &&
+ Objects.equals(getInputKeys(), taskDef.getInputKeys()) &&
+ Objects.equals(getOutputKeys(), taskDef.getOutputKeys()) &&
+ getTimeoutPolicy() == taskDef.getTimeoutPolicy() &&
+ getRetryLogic() == taskDef.getRetryLogic() &&
+ Objects.equals(getConcurrentExecLimit(), taskDef.getConcurrentExecLimit()) &&
+ Objects.equals(getRateLimitPerFrequency(), taskDef.getRateLimitPerFrequency()) &&
+ Objects.equals(getInputTemplate(), taskDef.getInputTemplate()) &&
+ Objects.equals(getIsolationGroupId(), taskDef.getIsolationGroupId()) &&
+ Objects.equals(getExecutionNameSpace(), taskDef.getExecutionNameSpace()) &&
+ Objects.equals(getOwnerEmail(), taskDef.getOwnerEmail());
}
@Override
public int hashCode() {
return Objects.hash(getName(), getDescription(), getRetryCount(), getTimeoutSeconds(), getInputKeys(),
- getOutputKeys(), getTimeoutPolicy(), getRetryLogic(), getRetryDelaySeconds(),
- getResponseTimeoutSeconds(), getConcurrentExecLimit(), getRateLimitPerFrequency(), getInputTemplate(),
- getIsolationGroupId(), getExecutionNameSpace(), getOwnerEmail());
+ getOutputKeys(), getTimeoutPolicy(), getRetryLogic(), getRetryDelaySeconds(),
+ getResponseTimeoutSeconds(), getConcurrentExecLimit(), getRateLimitPerFrequency(), getInputTemplate(),
+ getIsolationGroupId(), getExecutionNameSpace(), getOwnerEmail());
}
}
diff --git a/contribs/src/main/java/com/netflix/conductor/contribs/tasks/http/HttpTask.java b/contribs/src/main/java/com/netflix/conductor/contribs/tasks/http/HttpTask.java
index 018162c122..db4c967cd0 100644
--- a/contribs/src/main/java/com/netflix/conductor/contribs/tasks/http/HttpTask.java
+++ b/contribs/src/main/java/com/netflix/conductor/contribs/tasks/http/HttpTask.java
@@ -23,7 +23,6 @@
import com.netflix.conductor.core.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
@@ -40,10 +39,12 @@
import java.util.List;
import java.util.Map;
+import static com.netflix.conductor.common.metadata.tasks.TaskType.TASK_TYPE_HTTP;
+
/**
* Task that enables calling another HTTP endpoint as part of its execution
*/
-@Component(HttpTask.NAME)
+@Component(TASK_TYPE_HTTP)
public class HttpTask extends WorkflowSystemTask {
private static final Logger LOGGER = LoggerFactory.getLogger(HttpTask.class);
@@ -53,8 +54,6 @@ public class HttpTask extends WorkflowSystemTask {
static final String MISSING_REQUEST = "Missing HTTP request. Task input MUST have a '" + REQUEST_PARAMETER_NAME
+ "' key with HttpTask.Input as value. See documentation for HttpTask for required input parameters";
- public static final String NAME = "HTTP";
-
private final TypeReference