Skip to content

Error while accessing JSON Key with space in inputParameters #551

@ruben-mathews

Description

@ruben-mathews

Describe the bug

When JSON keys containing spaces are referenced in placeholders (e.g., ${http_ref.output.response.body["Booking Id"]}), the validation currently prevents saving the workflow.

Sample Workflow

{
  "createTime": 1752208058212,
  "updateTime": 1752220125935,
  "name": "SampleTestWorkflow",
  "version": 1,
  "tasks": [
    {
      "name": "http",
      "taskReferenceName": "http_ref",
      "inputParameters": {
        "uri": "https://orkes-api-tester.orkesconductor.com/api",
        "method": "GET",
        "accept": "application/json",
        "contentType": "application/json",
        "encode": true
      },
      "type": "HTTP",
      "decisionCases": {},
      "defaultCase": [],
      "forkTasks": [],
      "startDelay": 0,
      "joinOn": [],
      "optional": false,
      "defaultExclusiveJoinTask": [],
      "asyncComplete": false,
      "loopOver": [],
      "onStateChange": {},
      "permissive": false
    },
    {
      "name": "ruleEngine",
      "taskReferenceName": "ruleEngine_ref",
      "inputParameters": {
        "uri": "https://orkes-api-tester.orkesconductor.com/api",
        "values": {
          "data": "${http_ref.output.response.body[\"Booking Id\"]}"
        }
      },
      "type": "SIMPLE",
      "decisionCases": {},
      "defaultCase": [],
      "forkTasks": [],
      "startDelay": 0,
      "joinOn": [],
      "optional": false,
      "defaultExclusiveJoinTask": [],
      "asyncComplete": false,
      "loopOver": [],
      "onStateChange": {},
      "permissive": false
    }
  ],
  "inputParameters": [],
  "outputParameters": {},
  "schemaVersion": 2,
  "restartable": true,
  "workflowStatusListenerEnabled": false,
  "timeoutPolicy": "ALERT_ONLY",
  "timeoutSeconds": 0,
  "variables": {},
  "inputTemplate": {},
  "enforceSchema": true,
  "metadata": {}
}

In the above configuration, the ruleEngine node attempts to access the "booking id" field from the output of the http node

However, although DocumentContext from JsonPath allows access to keys with spaces using syntax like ['booking id'], the current placeholder parser does not support it, resulting in a validation error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions