Disabling server-side JavaScript syntax validation

JavaScript syntax validation ensures that the code snippets in process applications and toolkits are correctly structured and free of syntax errors. IBM® Business Automation Workflow supports server-side JavaScript validation in script activities and variable initialization in service flows and processes by default. To turn it off, you must add the setting to the 100Custom.xml file.

About this task

JavaScript validation parses the JavaScript code to determine whether any syntax errors are present, such as incomplete statements, missing tags, values, operators, expressions, or keywords. You can view validation errors and warnings in the following ways:
  • In the Workflow Center console under the current version of an application and each named snapshot
  • In the Process Designer footer, click Validation errors and warnings The image shows the Validation errors and warnings icon in the Process Designer footer.. You can choose to view the errors in the current artifact or project.

Because validation occurs on the workflow server, it can slow down performance for the user. For this reason, you might choose to enable it only when you want to import and test a process application for errors before you deploy the application on a production system. Alternatively, if your environment requires only client-side validation, you might prefer not to enable JavaScript syntax validation.

Use the javascript-serverside-validation-enabled setting to control whether server-side JavaScript syntax validation is enabled in Process Designer. The default value is true.

To change the value for the setting, you can override the value by adding or updating the setting in your 100Custom.xml files. For example, to add the setting to a 100Custom.xml file, add the following elements under the <properties> element and modify the values as needed:

<server>
   <javascript-serverside-validation-enabled merge="replace">false</javascript-serverside-validation-enabled>
</server>
For information about the individual 100Custom.xml files that need to be updated and their locations, see Location of 100Custom configuration files.

Procedure

To consistently and reliably change the value of these settings in all the 100Custom.xml files in your Business Automation Workflow deployment environment, use the updateBPMConfig command:

  1. Stop the servers for Workflow Server and Workflow Center.
  2. Start the scripting client in disconnected mode as described in updateBPMConfig command.
  3. Run the following commands to simultaneously update all affected servers:
    wsadmin> AdminTask.updateBPMConfig( [ '-create', '/server' ] )
    wsadmin> AdminTask.updateBPMConfig( [ '-create', '/server/javascript-serverside-validation-enabled', '-xNodeValue', 'true_or_false' ] )
    wsadmin> AdminConfig.save()
    Replace the true_or_false variable with either true or false.
  4. Restart the servers.

Results

Update the 100Custom.xml files by running the updateBPMConfig command. If the updates are unsuccessful, you can manually update the files by following the steps in Creating a 100Custom.xml configuration file.