conductor
conductor copied to clipboard
WorkflowTask#type does not work when i create new task definition
I created my own taskdefs named with Http
to take the place of System Tasks HTTP
.
But 'com.netflix.conductor.contribs.http.HttpTask#start' was executed.
{
"ownerApp": "",
"createTime": 1585726562870,
"updateTime": 1585726567765,
"status": "FAILED",
"endTime": 1585726567765,
"workflowId": "2b88d7e2-da38-4d90-b7cf-62559a238e72",
"tasks": [
{
"taskType": "Http",
"status": "FAILED",
"inputData": {
"http_request": {
"uri": "http://172.17.92.209:8080/service/defs",
"method": "GET",
"accept": "application/json",
"body": ""
}
},
"referenceTaskName": "Http_0",
"retryCount": 0,
"seq": 1,
"pollCount": 1,
"taskDefName": "Http",
"scheduledTime": 1585726562902,
"startTime": 1585726563111,
"endTime": 1585726567740,
"updateTime": 1585726563115,
"startDelayInSeconds": 0,
"retried": false,
"executed": false,
"callbackFromWorker": true,
"responseTimeoutSeconds": 3600,
"workflowInstanceId": "2b88d7e2-da38-4d90-b7cf-62559a238e72",
"workflowType": "service_defs",
"taskId": "798738cc-3d4b-4599-9dec-9a8ec6bb6362",
"reasonForIncompletion": "Failed to invoke http task due to: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out",
"callbackAfterSeconds": 0,
"workerId": "DESKTOP-0C0RD8T",
"outputData": {
"response": "com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out"
},
"workflowTask": {
"name": "Http",
"taskReferenceName": "Http_0",
"description": "",
"inputParameters": {
"http_request": {
"uri": "http://172.17.92.209:8080/service/defs",
"method": "GET",
"accept": "application/json",
"body": ""
}
},
"type": "SIMPLE",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"taskDefinition": {
"updateTime": 1585299528885,
"updatedBy": "",
"name": "Http",
"retryCount": 0,
"timeoutSeconds": 0,
"inputKeys": [],
"outputKeys": [],
"timeoutPolicy": "TIME_OUT_WF",
"retryLogic": "FIXED",
"retryDelaySeconds": 60,
"responseTimeoutSeconds": 3600,
"inputTemplate": {},
"rateLimitPerFrequency": 0,
"rateLimitFrequencyInSeconds": 1
},
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
},
"rateLimitPerFrequency": 0,
"rateLimitFrequencyInSeconds": 0,
"workflowPriority": 0,
"iteration": 0,
"loopOverTask": false,
"taskDefinition": {
"present": true
},
"queueWaitTime": 209,
"taskStatus": "FAILED",
"logs": []
}
],
"input": {},
"output": {
"returnObject": null
},
"workflowType": "service_defs",
"version": 1,
"reasonForIncompletion": "Failed to invoke http task due to: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketTimeoutException: Read timed out",
"schemaVersion": 2,
"taskToDomain": {},
"failedReferenceTaskNames": [
"Http_0"
],
"workflowDefinition": {
"createTime": 1585645197563,
"updateTime": 1585706991898,
"name": "service_defs",
"description": "",
"version": 1,
"tasks": [
{
"name": "Http",
"taskReferenceName": "Http_0",
"description": "",
"inputParameters": {
"http_request": {
"uri": "http://172.17.92.209:8080/service/defs",
"method": "GET",
"accept": "application/json",
"body": ""
}
},
"type": "SIMPLE",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"taskDefinition": {
"updateTime": 1585299528885,
"updatedBy": "",
"name": "Http",
"retryCount": 0,
"timeoutSeconds": 0,
"inputKeys": [],
"outputKeys": [],
"timeoutPolicy": "TIME_OUT_WF",
"retryLogic": "FIXED",
"retryDelaySeconds": 60,
"responseTimeoutSeconds": 3600,
"inputTemplate": {},
"rateLimitPerFrequency": 0,
"rateLimitFrequencyInSeconds": 1
},
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
}
],
"inputParameters": [],
"outputParameters": {
"returnObject": "${Http_0.output.response.body}"
},
"schemaVersion": 2,
"restartable": true,
"workflowStatusListenerEnabled": false
},
"priority": 0,
"startTime": 1585726562870,
"workflowName": "service_defs",
"workflowVersion": 1
}
@htpbackup Good catch, it is a bug where Conductor sets SIMPLE task's task type to WorkflowTask's name in SimpleTaskMapper
. Because the WorkflowTask's name is Http in this case, it consider it as system task and it's to Http task queue. Consider renaming your Workflow task to some other name instead of Http
, and please feel free to submit a PR if you have found a way to fix this for yourself.
@kishorebanala many thanks for the reply, I noticed this problem at first, so I named it ’Http‘, not ’HTTP‘.
com.netflix.conductor.core.execution.mapper.HTTPTaskMapper#getMappedTasks
Task httpTask = new Task();
httpTask.setTaskType(taskToSchedule.getType());