Details
-
Fix
-
Status: Released (View Workflow)
-
Medium
-
Resolution: Fixed
-
2.4.0
-
None
Description
Current Situation
- When variables are assigned values that include double quotes ("), for example in arguments to jobs, then the JOC Cockpit Workflow Editor applies wrong quoting.
- Assume that a user adds the following value to a command variable that indicates an SQL Statement:
SELECT count(*) as "total_order_count" FROM HISTORY_ORDERS WHERE CREATED BETWEEN '$start_datetime_utc' AND '$end_datetime_utc'
- This value is stored in JSON format like this:
"command": "\"SELECT count(*) as \\\\\\\"total_order_count\\\\\\\" FROM HISTORY_ORDERS WHERE CREATED BETWEEN '$start_datetime_utc' AND '$end_datetime_utc'\"",
Desired Behavior
- The correct quoting for the above example is like this:
"command": "\"SELECT count(*) as \\\"total_order_count\\\" FROM HISTORY_ORDERS WHERE CREATED BETWEEN '$start_datetime_utc' AND '$end_datetime_utc'\"",
Workaround
- Users can use the "Edit JSON" action menu item to manually correct wrong quoting in JSON.
- Remove the superfluous backslashes in front of double quotes from \\\\\\\" and make this \\\".
- Having submitted the changes from the "Edit JSON" popup window immediately deploy the workflow without further changes as otherwise the Workflow Editor will re-write the JSON format in wrong quoting.