Conductor: inputTemplate value not override by custom value

Created on 1 Nov 2019  路  4Comments  路  Source: Netflix/conductor

define task:

[{
    "name": "task_one",
    "retryCount": 2,
    "timeoutSeconds": 600,
    "inputTemplate": {
      "a": 100,
      "b": 200
    },
    "inputKeys": [
      "c"
    ],
    "outputKeys": [
      "result"
    ],
    "timeoutPolicy": "TIME_OUT_WF",
    "retryLogic": "FIXED",
    "retryDelaySeconds": 5,
    "responseTimeoutSeconds": 60
  }]

define workflow:


  {
    "name": "task_one_workflow",
    "description": "task_one_workflow",
    "version": 1,
    "tasks": [
      {
        "name": "task_one",
        "taskReferenceName": "task_one",
        "inputParameters": {
          "a": "${workflow.input.a}",
          "b": "${workflow.input.b}",
          "c": "${workflow.input.c}"
        },
        "type": "SIMPLE",
        "startDelay": 0
      }
    ],
    "schemaVersion": 2
  }

start workflow with:

{
    "name": "task_one_workflow",
    "version": 1,
    "correlationId": "my_unique_correlation_id",
    "input": {
        "b": 456,
        "c": 7890    }
}

finally I got value from task.getInputData() result:

  • a: 100
  • b: 200
  • c: 7890

I don't know why b value is 200, not 456, any one meet this problem yet?

bug

Most helpful comment

@apanicker-nflx I submit a PR #1418 for this issue.

All 4 comments

@anxiaoyi I have labeled this as a question for now. Will run some tests and change this to a bug if required.
In the meantime, I will wait for other users to comment on if they have encountered this behavior in their workflows.

@anxiaoyi I have labeled this as a question for now. Will run some tests and change this to a bug if required.
In the meantime, I will wait for other users to comment on if they have encountered this behavior in their workflows.

@apanicker-nflx
I got the same problem, and I didn't find the code for the workflow's _input_ to override the task's _inputParameters_ value.

https://github.com/Netflix/conductor/blob/27ab532d2f625492a07aff39130e28790e871843/core/src/main/java/com/netflix/conductor/core/execution/ParametersUtils.java#L73

@rayoy Thanks for flagging this. I have re-labeled this to a bug.
Please feel free to submit a PR with the fix if you would want a fix immediately. We will try to fix this issue in an upcoming release.

@apanicker-nflx I submit a PR #1418 for this issue.

Was this page helpful?
0 / 5 - 0 ratings