Siebel Presumed Child Property Set

Scripts presume the existence of a child property set. For example see the following code snippet

function CheckAndImport()
{. . .  . .
bsAdapter.InvokeMethod("Query",vInputs,vOutputs);
var vInMsg = vOutputs.GetChild(0);
vInputs.Reset();
vOutputs.Reset();
vInputs.AddChild(vInMsg);
vInputs.SetProperty("MapName","Midea Price List Item Import");
bsTransfer.InvokeMethod("Execute",vInputs,vOutputs);
var vOutMsg = vOutputs.GetChild(0);
. . . . . }

This could lead to unhandled errors and corrupt data, since when an operation is performed on a nonexistent child, an error is thrown.

Recommendation

Ensure that the presence of the child property set is always checked by ensuring the GetChildCount() method of the parent returns a positive number.

An example used in the scenario is based on the preceding code: BY DW

function CheckAndImport()
{. . .  . .
bsAdapter.InvokeMethod("Query",vInputs,vOutputs);
if(vOutputs.GetChildCount()>0)
{
var vInMsg = vOutputs.GetChild(0);
vInputs.Reset();
vOutputs.Reset();
vInputs.AddChild(vInMsg);
vInputs.SetProperty("MapName","Midea Price List Item Import");
bsTransfer.InvokeMethod("Execute",vInputs,vOutputs);
var vOutMsg = vOutputs.GetChild(0);
}
. . . . . }
时间: 2025-01-08 10:55:59

Siebel Presumed Child Property Set的相关文章

NHibernate官方文档中文版--基础ORM(Basic O/R Mapping)

映射声明 对象/关系映射在XML文件中配置.mapping文件这样设计是为了使它可读性强并且可修改.mapping语言是以对象为中心,意味着mapping是围绕着持久化类声明来建立的,而不是围绕数据表. 要注意的是,尽管很多NHibernate使用者选择手动定义XML文件,但是仍然有很多工具可以用来生成mapping文件,包括NHibernate.Mapping.Attributes 库和各种各样基于模板的代码生成工具(CodeSmith, MyGeneration). 让我们用一个mappin

angularJS 系列(一)

angularJS 中 $scope 的原型 和 原型继承之间的细微差别是什么? 参考:http://stackoverflow.com/questions/14049480/what-are-the-nuances-of-scope-prototypal-prototypical-inheritance-in-angularjs The API Reference Scope page says: A scope can inherit from a parent scope. The Dev

@ViewDebug.ExportedProperty的使用

原文链接:http://daemon369.github.io/android/2014/06/12/android-viewdebug-exportedproperty/ http://www.eoeandroid.com/thread-55461-1-1.html: This annotation can be used to mark fields and methods to be dumped by the view server. Only non-void methods with

Using LINQ to SharePoint

LINQ and LINQ Providers LINQ is a feature of the programming languages C# and Microsoft Visual Basic .NET. Compilers are included with Visual Studio. LINQ adds a SQL-like syntax and vocabulary to each of the languages, which can be used to query data

普通类型的归档方法

归档: 名副其实的就是把所有东西归纳在一个文档或者文件里面, 当我们需要的时候才拿到编译器使用, 这个就和我们从网上下载视频到硬盘, 需要的时候再用播放器打开一样. PS: 归档之后的文件不能正常的打开, 只能用CMD或者是编译器的一些代码读取并且释放, 注意, 是先读取后释放, 不然释放在读取前面, 就会找不到文件或者文档所在的路径, 从而无法还原代码. 下面是简单的文件归档和读取释放的例子: Human.h文件 #import <Foundation/Foundation.h> @inte

delegate 集成在类中,还是单独写在.h文件中?

转:http://stackoverflow.com/questions/11382057/declaring-a-delegate-protocol There definitely are subtle differences. If the protocol you are talking about is a delegate that is used by one particular class, for example, MySpecialViewController, and M

XHTML &amp; CSS 基础知识入门

查看一个网页的源代码只需要右击空白处点击查看网页源代码或者ctrl+U即可. 下载text editor文档编辑器 学习html和css前,我们需要一个text editor文档编辑器,计算机自带的notepad 可以写html文件,但是用文本文档写出来的文件可阅读性不强.我们可以下载notepad++来写html (notepad++也可以用来写很多其他语言的文件)且是免费试用的,很方便.[Notepad++官方下载地址] 下载安装好Notepad后我们就可以开始写html文件了. HTML里

Problem with generating association inside dbml file for LINQ to SQL

Question: I have created a dbml file in my project, and then dragged two tables from a database into the designer. This is the tables for order header and order lines, and order lines have a foreign key to order header to make it a one to many relati

Specify Computed Columns in a Table

https://docs.microsoft.com/en-us/sql/relational-databases/tables/specify-computed-columns-in-a-table?view=sql-server-2017 Before You Begin Limitations and Restrictions A computed column cannot be used as a DEFAULT or FOREIGN KEY constraint definition