Removing Terminator in SQL job makes process tab un-editable | unexpected error
book
Article ID: 407190
calendar_today
Updated On:
Products
CA Automic Workload Automation - Automation EngineCA Automic One AutomationAutomic SaaS
Issue/Introduction
In versions 21.0.14 and 24.4.1, when removing the terminator symbol from a SQL_SET_STATEMENT_TERMINATOR, saving the changes, and re-opening, the Process tab is no longer editable and now shows an error:
Error An unexpected error occurred. Further details are available in the logfiles.
Clicking on this then shows two stack traces:
Invocation of method attach in com.automic.ecc.ae.sheet.formbuilder.common.extension.FormScriptEditorExtension$$Lambda$2343/0x0000020295b81000 failed.com.vaadin.event.ListenerMethod$MethodException com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:533) com.vaadin.event.EventRouter.fireEvent(EventRouter.java:200) com.vaadin.event.EventRouter.fireEvent(EventRouter.java:163) ...
Cannot invoke "String.length()" because "suffix" is nulljava.lang.NullPointerException java.base/java.lang.String.endsWith(String.java:2317) com.automic.ecc.plugins.sql.formbuilder.scripteditor.provider.SQLCommandViewFactory.createCodeCommand(SQLCommandViewFactory.java:52) ...
Steps to reproduce:
Create a JOBS.SQL object
Using the "Form" choice in the process tab, add an Automation Engine Command -> Set Statement Termintor (SQL_SET_STATEMENT_TERMINATOR)
Add a command -> SQL Statements -> User Defined (USER_DEFINED) and put whatever you'd like in here, f.ex. select sysdate from dual;
Save the changes
Go to the Set Statement Terminator command and remove the symbol so that it is blank
Save the changes
Close the object
Re-open the object
Environment
Automation Engine and AWI versions 21.0.14 or 24.4.1
Cause
This is a known issue
Resolution
This has been identified as a known issue and is fixed with Automic Automation release 24.4.2.
Possible workarounds:
1) Preferred: Use Version Management to Restore an older version where the symbol was there. This requires the use of Version Management which must already be in place before this workaround can be used.
2) Unpreferred due to the risk of human error: Edit xml files:
In the AWI, export the object that was updated
Open the .xml export in a text editor
In the line that shows "<MSCRI><![CDATA[SQL_SET_STATEMENT_TERMINATOR TERM=;" add the desired terminator between the equal sign and the semi-colon (example below with @ as the terminator):