Configuring Siebel Business Applications > Reference Materials for Configuring Siebel Business Application >

Extensive Code Examples That This Book Uses


This topic includes extensive code examples that this book uses.

Script for the Query Method when Configuring a Hierarchical List Applet

The code in this topic creates test data for the query result. To get data from an external system, the query script you use must contain code that is specific to your requirements. To get the data, you must define your own custom algorithm. For more information about using a virtual business component, see Integration Platform Technologies: Siebel Enterprise Application Integration. For more information about this example, see Configuring a Hierarchical List Applet to Use External Data.

For the example in this book, use the following script for the Query of the Hierarchical List Service business service:

function Query( Inputs, Outputs )

{

var row;

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "1");

row.SetProperty("Description", "Haus");

row.SetProperty("Amount", "740000");

row.SetProperty ("Parent Row Id", "");

row.SetProperty("Has Children", "Y");

row.SetProperty("Is Expanded", "Y");

row.SetProperty("Outline Number", "1");

row.SetProperty("Last Child Info", "1");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "1.1");

row.SetProperty("Description", "T1");

row.SetProperty("Amount", "240000");

row.SetProperty("Parent Row Id", "1");

row.SetProperty("Has Children", "Y");

row.SetProperty("Is Expanded", "Y");

row.SetProperty("Outline Number", "1.1");

row.SetProperty("Last Child Info", "10");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "1.1.1");

row.SetProperty("Description", "Kurant");

row.SetProperty("Amount", "200000");

row.SetProperty("Parent Row Id", "1.1");

row.SetProperty("Has Children", "N");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "1.1.1");

row.SetProperty("Last Child Info", "100");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "1.1.2");

row.SetProperty("Description", "Blanko");

row.SetProperty("Amount", "40000");

row.SetProperty("Parent Row Id", "1.1");

row.SetProperty("Has Children", "N");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "1.1.2");

row.SetProperty("Last Child Info", "101");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "1.2");

row.SetProperty("Description", "T3");

row.SetProperty("Amount", "500000");

row.SetProperty("Parent Row Id", "1");

row.SetProperty("Has Children", "Y");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "1.2");

row.SetProperty("Last Child Info", "11");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "1.2.1");

row.SetProperty("Description", "Kurant");

row.SetProperty("Amount", "500000");

row.SetProperty("Parent Row Id", "1.2");

row.SetProperty("Has Children", "N");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "1.2.1");

row.SetProperty("Last Child Info", "111");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "2");

row.SetProperty("Description", "Auto");

row.SetProperty("Amount", "13500");

row.SetProperty ("Parent Row Id", "");

row.SetProperty("Has Children", "Y");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "2");

row.SetProperty("Last Child Info", "1");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "2.1");

row.SetProperty("Description", "T4");

row.SetProperty("Amount", "240000");

row.SetProperty("Parent Row Id", "2");

row.SetProperty("Has Children", "Y");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "2.1");

row.SetProperty("Last Child Info", "10");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "2.1.1");

row.SetProperty("Description", "Blanko");

row.SetProperty("Amount", "40000");

row.SetProperty("Parent Row Id", "2.1");

row.SetProperty("Has Children", "N");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "2.1.1");

row.SetProperty("Last Child Info", "101");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "3");

row.SetProperty("Description", "Nieren");

row.SetProperty("Amount", "8000");

row.SetProperty ("Parent Row Id", "");

row.SetProperty("Has Children", "Y");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "3");

row.SetProperty("Last Child Info", "1");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "3.1");

row.SetProperty("Description", "T1");

row.SetProperty("Amount", "8000");

row.SetProperty("Parent Row Id", "3");

row.SetProperty("Has Children", "N");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "3.1");

row.SetProperty("Last Child Info", "11");

Outputs.AddChild( row );

row = TheApplication().NewPropertySet();

row.SetProperty("Id", "3.1.1");

row.SetProperty("Description", "Kurant");

row.SetProperty("Amount", "8000");

row.SetProperty("Parent Row Id", "3.1");

row.SetProperty("Has Children", "");

row.SetProperty("Is Expanded", "N");

row.SetProperty("Outline Number", "");

row.SetProperty("Last Child Info", "");

Outputs.AddChild( row );

return( CancelOperation );

}

Configuring Siebel Business Applications Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.