My Oracle Support Banner

Understand Behaviour Of "terminate With Error" Command In Scripts (Doc ID 1682229.1)

Last updated on JUNE 03, 2024

Applies to:

Oracle Utilities Customer Care and Billing - Version 2.4.0.1.0 and later
Oracle Utilities Framework - Version 4.2.0.1.0 to 4.2.0.2.0 [Release 4.2]
Information in this document applies to any platform.

Symptoms

**Any examples provided in this article do not represent real life personal/confidential information**

**Disclaimer:** This KM article may include the following abbreviations:

CCB/CC&B - Oracle Utilities Customer Care and Billing

CM - Customer Modification

OUAF/FW - Oracle Utilities Framework

ETM/ETPM - Oracle Enterprise Taxation and Policy Management

On : 2.4.0.1.0 version, ENV - Environment

Script command "terminate with error" throws runtime error when one of its parameter is asked to populate from xpath function.

1.Create a service script and use "Terminate with error" command.
2.Use xpath function in one of its parameter.
ex %1=substring(ScratchVariables/testString,1,4)
Actual : Script execution engine throws runtime error.


Example:
Script:
...
else
  move 'CMATXTIC' to $charType;
  move "$charType" to "CM_CharType/characteristicType";
  invokeBO 'CM_CharType' using "CM_CharType" for read;
  terminate with error(90005,30019 %1="fn:substring(CM_CharType/description,1,30)" %2="fn:substring(CM_CharType/description,31,60)");
end-if;
...

The same code works if  initialise two variables before the terminate with error command as below and use them as parameter values:
Script:
...
else
  move 'CMATXTIC' to $charType;
  move "$charType" to "CM_CharType/characteristicType";
  invokeBO 'CM_CharType' using "CM_CharType" for read;
  move "fn:substring(CM_CharType/description,1,30)" to $parm1;
  move "fn:substring(CM_CharType/description,31,60)" to $parm2;
  terminate with error(90005,30019 %1="$parm1" %2="$parm2");
end-if;


ERROR
-----------------------
com.splwg.base.support.scripting.actions.Terminate.privateInvoke(Terminate.java:70): Failed invoking step : terminate with error (90002, 21013 %1="fn:substring(CM_CharType/description,1,25)" %2="fn:substring(CM_CharType/description,26,56)");

at com.splwg.shared.common.LoggedException.raised(LoggedException.java:67)
at com.splwg.base.api.logging.data.logger.AdvancedLoggerUtility.raisedException(AdvancedLoggerUtility.java:59)
at com.splwg.base.support.scripting.DataAreas.getSchemaForDataArea(DataAreas.java:67)
at com.splwg.base.support.scripting.actions.Terminate.getSchemaFieldMDFromXpath(Terminate.java:140)
at com.splwg.base.support.scripting.actions.Terminate.addToMessageParameters(Terminate.java:98)
at com.splwg.base.support.scripting.actions.Terminate.privateInvoke(Terminate.java:70)
at com.splwg.base.support.scripting.actions.Action.invoke(Action.java:54)
at com.splwg.base.support.scripting.InvocationContext.invokeAction(InvocationContext.java:71)
at com.splwg.base.support.scripting.ScriptTreeWalker.evaluate(ScriptTreeWalker.java:27)
at com.splwg.base.support.scripting.InvocationContext.executeAST(InvocationContext.java:167)
at com.splwg.base.support.scripting.actions.StructuredAction.executeStatementBlock(StructuredAction.java:34)
at com.splwg.base.support.scripting.actions.StructuredIf.privateInvoke(StructuredIf.java:42)
at com.splwg.base.support.scripting.actions.Action.invoke(Action.java:54)
at com.splwg.base.support.scripting.InvocationContext.invokeAction(InvocationContext.java:71)
at com.splwg.base.support.scripting.ScriptTreeWalker.evaluate(ScriptTreeWalker.java:27)
at com.splwg.base.support.scripting.InvocationContext.executeAST(InvocationContext.java:167)
at com.splwg.base.support.scripting.actions.StructuredAction.executeStatementBlock(StructuredAction.java:34)
at com.splwg.base.support.scripting.actions.StructuredIf.privateInvoke(StructuredIf.java:42)
at com.splwg.base.support.scripting.actions.Action.invoke(Action.java:54)
at com.splwg.base.support.scripting.InvocationContext.invokeAction(InvocationContext.java:71)
at com.splwg.base.support.scripting.ScriptTreeWalker.evaluate(ScriptTreeWalker.java:27)
at com.splwg.base.support.scripting.InvocationContext.executeAST(InvocationContext.java:167)
at com.splwg.base.support.scripting.actions.StructuredAction.executeStatementBlock(StructuredAction.java:34)
at com.splwg.base.support.scripting.actions.EditData.privateInvoke(EditData.java:22)
at com.splwg.base.support.scripting.actions.Action.invoke(Action.java:54)
at com.splwg.base.support.scripting.InvocationContext.invokeAction(InvocationContext.java:71)
at com.splwg.base.support.scripting.ScriptTreeWalker.evaluate(ScriptTreeWalker.java:27)
at com.splwg.base.support.scripting.ScriptTreeWalker.evaluate(ScriptTreeWalker.java:22)
at com.splwg.base.support.scripting.InvocationContext.executeAST(InvocationContext.java:167)
at com.splwg.base.support.scripting.InvocableScript.invoke(InvocableScript.java:299)
at com.splwg.base.support.scripting.plugin.PluginScriptInvocationCallback.algorithmInvoked(PluginScriptInvocationCallback.java:47)
at com.splwg.base.support.scripting.plugin.helpers.AlgorithmProxyInvocationHandler$1.run(AlgorithmProxyInvocationHandler.java:58)
at com.splwg.base.support.scripting.plugin.helpers.AlgorithmProxyInvocationHandler$JumpToFWRunner.run(AlgorithmProxyInvocationHandler.java:125)
at com.splwg.base.support.interception.SessionInterceptionManager.notifyGenericCallStackJump(SessionInterceptionManager.java:296)
at com.splwg.base.support.context.FrameworkSession.notifyGenericCallStackJump(FrameworkSession.java:2111)
at com.splwg.base.support.scripting.plugin.helpers.AlgorithmProxyInvocationHandler.executeCallStackJump(AlgorithmProxyInvocationHandler.java:111)
at com.splwg.base.support.scripting.plugin.helpers.AlgorithmProxyInvocationHandler.invoke(AlgorithmProxyInvocationHandler.java:61)
at com.sun.proxy.$Proxy140.invoke(Unknown Source)
at com.splwg.base.support.algorithm.AbstractFromCobolAlgorithmWrapper.invoke(AbstractFromCobolAlgorithmWrapper.java:44)
at com.splwg.ccb.domain.admin.cobolInterface.caseType.CaseEnterStatusValidationAlgorithmFromCobolWrapper_Gen.invoke(CaseEnterStatusValidationAlgorithmFromCobolWrapper_Gen.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.splwg.base.support.cobol.CobolToJavaGateway$MethodDispatcherCache$MethodDispatcher.dispatchToRequestedMethod(CobolToJavaGateway.java:337)
at com.splwg.base.support.cobol.CobolToJavaGateway$MethodDispatcherCache$MethodDispatcher.access$300(CobolToJavaGateway.java:255)
at com.splwg.base.support.cobol.CobolToJavaGateway$MethodDispatcherCache.dispatchToRequestedMethod(CobolToJavaGateway.java:250)
at com.splwg.base.support.cobol.CobolToJavaGateway$MethodDispatcherCache.access$000(CobolToJavaGateway.java:232)
at com.splwg.base.support.cobol.CobolToJavaGateway.callJava(CobolToJavaGateway.java:65)
at com.splwg.base.support.cobol.host.command.CobolToJavaGatewayCommand.invoke(CobolToJavaGatewayCommand.java:33)
at com.splwg.base.support.cobol.host.PerformCommandExecuter.invoke(PerformCommandExecuter.java:68)
at com.splwg.base.support.cobol.host.OptimizedRemoteExecuterSkel$RequestSocketReader.readRequestExecuteAndRespond(OptimizedRemoteExecuterSkel.java:167)
at com.splwg.base.support.cobol.host.OptimizedRemoteExecuterSkel$RequestSocketReader.run(OptimizedRemoteExecuterSkel.java:101)
at com.splwg.base.support.cobol.host.SocketThreadPool$WrappingParentRunnable.run(SocketThreadPool.java:204)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
SYSUSER - 939140-4966-1 2014-05-21 15:28:09,407 [Remote JVM:3 Thread 1] INFO (COBOL.CIPCACPR) 2014-05-21-15.28.07 User: SYSUSER 15:28:09.40 Start: CIPCACPR
SYSUSER - 939140-4966-1 2014-05-21 15:28:12,952 [Parent Reader:Thread-47] INFO (support.context.FrameworkSession) (Server Message)
Category: 11001
Number: 502
Call Sequence:
Program Name:
Text: System Error. Please see logs for more details.
Description:
Table: null
Field: null

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.