eScript Clib.sprintf() Method Does Not Work When Called Within A "with" Statement (Doc ID 2085044.1)

Last updated on MARCH 02, 2017

Applies to:

Siebel CRM - Version 8.1.1.11.17 [IP2013] to 16.7 [IP2016] [Release V8 to V16]
Information in this document applies to any platform.

Symptoms

Wrong behavior of the Clib.sprintf function.

The issue is reproducible with the 8.1.1.11.17 and later Siebel versions. It is not reproducible with the 7.8 and it was not checked the 8.0 and 8.1.

Briefly, if the Clib.sprintf() is called inside of "with" block then it returns an empty string.

Business Service "GClibTest" to reproduce the issue is attached (GClibTest.sif).
The "test1" method returns two properties "tmpStr1" and "tmpStr2".
Expected result: tmpStr1=11 and tmpStr2=22.
Actual results: tmpStr1=11 and tmpStr2=.

The customer scenario has been tested using a standard Siebel environment 8.1.1.11.17 and the behavior described has been reproduced.

The steps to reproduce with standard Siebel Call Center application are the following:

1. In the "Administration - Business Service" screen create a "TEST" runtime BS with the following server script code:
- - -
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
if (MethodName=="TEST")
{
var tmpStr1="";
var tmpStr2="";

Clib.sprintf(tmpStr1,"%02u",11);
Outputs.SetProperty("tmpStr1",tmpStr1);

with(Inputs)
{
Clib.sprintf(tmpStr2,"%02u",22);
Outputs.SetProperty("tmpStr2",tmpStr2);
}

return (CancelOperation);
}

return (ContinueOperation);
}

- - -

2. Using the Business Simulator run the "TEST" method of "TEST" BS (Service Name: TEST, Method Name: TEST)

3. In the Output Arguments list applet, open the "Property Set Properties" popup applet from the "Properties Name" list column:
> you will see the following properties:
- - -
Property Name: tmpStr2
Property Value:
- - -
Property Name: tmpStr1
Property Value: 11
- - -

>> The tmpStr2 property should returns 22, not an empty string

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms