Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-3831

Forbid reserved keywords in Automation Chain name

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Acknowledged
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Automation

      Description

      The use of some reserved keywords like void makes Automation Scripting fail with stack traces like

      ****** chain ******
      Name: myAutomationChain
      Exception: OperationException
      Caught error: javax.script.ScriptException: <eval>:1763:4 Expected ident but found void
      var void = function(input,params) {
          ^ in <eval> at line number 1763 at column number 4
      Caused by: javax.script.ScriptException: <eval>:1763:4 Expected ident but found void
      var void = function(input,params) {
          ^ in <eval> at line number 1763 at column number 4
      ****** Hierarchy calls ******
      	org.nuxeo.ecm.automation.jsf.operations.GetDocumentsFromSelectionList
      		org.nuxeo.automation.scripting.internals.operation.ScriptingOperationImpl
      

      even if the void Automation chain is not used by this script.

      TODO:

      • List all possible reserved keywords
      • When an automation script named with a reserved keyword is created / renamed, prevent creation or renaming:
        This feature cannot be named like a reserved keyword.
      • For existing automation scripts, provide a validation error:
        This feature name is a reserved keyword. Please rename it to avoid potential errors after deployment.

      HOW TO DEMO / TEST:

      • Have an existing automation script named "void".
      • Deploy fix, and see that the validation error appears.
      • Try to create an automation script named after a reserved keyword: you are prevented to do it.
      • Try to create an automation script named after a reserved keyword using the copy feature: you are prevented to do it.
      • Try to rename an automation script using a reserved keyword: you are prevented to do it.
      • Rename the existing "void" automation script with a non reserved name: you can rename it.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: