FORK_JOIN_DYNAMIC task throw error: Input to the dynamically forked tasks is not a map
Hi, testing FORK_JOIN_DYNAMIC tasks I got the error "Input to the dynamically forked tasks is not a map -> expecting a map of K,V but found null"
Workflow:
{
"name": "fork_join2",
"tasks": [
{
"name": "dynamic_fanout",
"taskReferenceName": "dynamic_fanout",
"inputParameters": {
"dynamicTasks": "${workflow.input.dynamicTasks}",
"inputTasks": "${workflow.input.inputTasks}"
},
"type": "FORK_JOIN_DYNAMIC",
"dynamicForkTasksParam": "dynamicTasks",
"dynamicForkTasksInputParamName": "inputTasks",
"startDelay": 0
},
{
"name": "dynamic_join",
"taskReferenceName": "dynamic_join",
"type": "JOIN"
}
]
}
Workflow's data:
{
"name": "fork_join2",
"correlationId": "442",
"input": {
"inputTasks": {
"forkedTask1": {
"width": 100
},
"forkedTask2": {
"width": 200
}
},
"dynamicTasks": [
{
"name": "name",
"taskReferenceName": "forkedTask1",
"type": "SIMPLE"
},
{
"name": "name",
"taskReferenceName": "forkedTask2",
"type": "SIMPLE"
}
]
}
}
There is an error in my Initial data?
For the name parameter under dynamicTasks, can you change it to the FORK_JOIN_DYNAMIC task's name.
name -> dynamic_fanout
Thank you for your answer, I still get the error, withe the initial data:
{
"name": "fork_join23",
"correlationId": "44233",
"input": {
"inputTasks": {
"dynamic_fanout": {
"width": 100
}
},
"dynamicTasks": [
{
"name": "dynamic_fanout",
"taskReferenceName": "dynamic_fanout1",
"type": "SIMPLE"
}
]
}
}
And when I click on "retry" button I get the following error:
<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Error: Internal Server Error<br> at Request.callback (/app/ui/node_modules/superagent/lib/node/index.js:698:17)<br> at IncomingMessage.<anonymous> (/app/ui/node_modules/superagent/lib/node/index.js:922:12)<br> at IncomingMessage.emit (events.js:187:15)<br> at endReadableNT (_stream_readable.js:1085:12)<br> at process._tickCallback (internal/process/next_tick.js:63:19)</pre>\n</body>\n</html>\n
And server shows:
java.lang.NullPointerException```
Can you show the full stack trace? you will need to register tasks as Task definitions in the server.
e.g, dynamic_fanout and dynamic_join
Thank you @saidatta, I registered the task as Task definitions and my workflow worked