Siebel Object Interfaces Reference > Siebel Object Interfaces Reference > Object Interfaces Reference >

Business Service Methods


This topic describes business service methods. It includes the following topics:

In this topic, the oService variable identifies a business service instance.

GetFirstProperty Method for a Business Service

The GetFirstProperty method returns a string that contains the name of the first property that is defined for a business service.

Format

oService.GetFirstProperty()

No arguments are available.

Usage for a Method that Gets a Business Service Property

The order that Siebel CRM uses to store properties in a property set is random. For example, the Name property is the first property that Siebel Tools displays in the Business Services list for every business service. However, the GetFirstProperty method might return any business service property, not necessarily the Name property. To correct this situation it is recommended that you add the properties in a property set to an array, and then sort that array.

To get or modify a property value, you can do the following:

  1. Use the GetFirstProperty method or GetNextProperty method to return the name of a property.
  2. Use the name you returned in Step 1 in one of the following ways:
    • To return a property value, as an argument in the GetProperty method.
    • To set a property value, as an argument in the SetProperty method.

For more information, see the following topics:

Used With

Browser Script, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

Example of Using Methods that Return a Business Service Property

The example in this topic returns the number of property sets that belong to a business service.

The following example is in Siebel eScript:

function countPropSets(busService)
{
   var propSetName = busService.GetFirstProperty();
   var count = 0;

   while(propSetName != "")
   {
      count++;
      propSetName = busService.GetNextProperty();
   }

   return count;
}

The following example is for Siebel Java Data Bean:

public int countPropSets(SiebelService busService)
{
   int count = 0;
   try
   {
      String propSetName = busService.getFirstProperty();
      while(propSetName != "")
      {
         count++;
         propSetName = busService.getNextProperty();
      }

   }

    catch(SiebelException sExcept)
   {
      return 0;
   }

   return count;
}

GetNextProperty Method for a Business Service

The GetNextProperty method returns a string that contains the name of the next property of a business service. If no more properties exist, then this method returns an empty string.

Format

oService.GetNextProperty()

No arguments are available.

Usage for the GetNextProperty Method

After you call the GetFirstProperty method to return the name of the first property of a business service, you can call the GetNextProperty to return the name of the next property. This next property is the next property that is defined for a business service after the first property.

You can use the GetNextProperty consecutively to cycle through all the properties of a business service until no more properties exist, at which point Siebel CRM returns an empty string.

Usage for the GetNextProperty is similar to usage for the GetFirstProperty method. For more information, see Usage for a Method that Gets a Business Service Property.

Used With

Browser Script, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

Examples

For examples, see Example of Using Methods that Return a Business Service Property.

GetProperty Method for a Business Service

The GetProperty method returns a string that contains the value of a property. If the property does not exist, then this method returns NULL.

Format

oService.GetProperty(propName)

Table 83 describes the arguments for the GetProperty method.

Table 83. Arguments for the GetProperty Method
Argument
Description

propName

A string that contains the name of the property that Siebel CRM returns.

Usage

To return the value for this property you must know the name of the property. To return a property name, use the GetFirstProperty method or the GetNextProperty method. For more information, see Usage for a Method that Gets a Business Service Property.

Used With

Browser Script, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

InvokeMethod Method for a Business Service

The InvokeMethod method calls a method on a business service. This method can be a specialized method or a custom method. For more information, see About Specialized and Custom Methods. This method does not return any information.

Siebel eScript Format

oService.InvokeMethod(methodName, InputArguments, OutputArguments)

Table 84 describes the arguments for the Siebel eScript format of the InvokeMethod method.

Table 84. Arguments for the Siebel eScript Format of the InvokeMethod Method
Argument
Description

methodName

A string that contains the name of the method that Siebel CRM must run.

InputArguments

A property set that identifies the arguments that the method uses as input.

InputArguments

A property set that identifies the arguments that the method returns as output.

Siebel VB Format

oService.InvokeMethod methodName, InputArguments, OutputArguments

The arguments you use in this format are the same as the arguments that are described in Table 84.

Browser Script Format

outputPropSet=Service.InvokeMethod(MethodName, inputPropSet)

The arguments you use with this format are the same as the arguments described in Table 25.

In Browser Script, you cannot use an output property set for this format.

Usage

A predefined business service works in a way that is similar to how a call to a business component method works. You can call a specialized method on a business service that is not available directly through the object interface.

You must use this method only with Siebel VB or Siebel eScript scripts. You must use Siebel Tools to write these scripts. You can call these scripts from an external interface.

A run-time business service can include a custom method.

Although the InvokeMethod function does not return a value, the properties in the OutputArguments property set might be modified.

For more information, see Caution About Using the InvokeMethod Method.

Used With

Browser Script, COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script, Web Client Automation Server

Related Topics

For more information, see the following topics:

Name Method for a Business Service

The Name method returns a string that contains the name of a business service.

Format

oService.Name

No arguments are available.

Used With

Browser Script, COM Data Control, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script, Web Client Automation Server

Examples

The following example is in Browser Script:

var svc = theApplication().GetService("Data Quality Manager"):
theApplication().SWEAlert("The active service is " + svc.Name());

PropertyExists Method for a Business Service

The PropertyExists method returns one of the following values to indicate if a property exists:

  • In Siebel VB, this method returns one of the following integers:
    • 1. Indicates the property exists.
    • 0 (zero). Indicates the property does not exist.
  • In other interfaces, this method returns a Boolean value.
Format

oService.PropertyExists(propName)

Table 85 describes the arguments for the PropertyExists method.

Table 85. Arguments for the PropertyExists Method
Argument
Description

propName

A string that contains the name of the property.

Usage

Use the PropertyExists method in an If statement to determine if a specific property is set.

Used With

Browser Script, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

Release Method for a Business Service

The Release method for a business service releases a business service and the resources that this business service uses on the Siebel Server.

Format

oBusSvc.release()

No arguments are available.

Used With

Siebel Java Data Bean

Examples

The following example logs in to a Siebel Server. It then creates a business object instance, a business component instance, and a business service instance. Next, it releases them in reverse order.

import com.siebel.data.*;
import com.siebel.data.SiebelException;

public class JDBReleaseDemo
{
   private SiebelDataBean m_dataBean = null;
   private SiebelBusObject m_busObject = null;
   private SiebelBusComp m_busComp = null;
   private SiebelService m_busServ = null;

   public static void main(String[] args)
   {
      JDBReleaseDemo demo = new JDBReleaseDemo();
   }

   public JDBReleaseDemo()
   {
      try
      {

         // instantiate the Siebel Java Data Bean
         m_dataBean = new SiebelDataBean();

         // login to the Siebel Servers
         m_dataBean.login("siebel.tcpip.none.none://gateway:port/enterprise/
         object manager","userid","password");
         System.out.println("Logged in to the Siebel Server ");

         // get the business object
         m_busObject = m_dataBean.getBusObject("Account");

         // get the business component
         m_busComp = m_busObject.getBusComp("Account");

         // get the business service
         m_busServ = m_dataBean.getService("Workflow Process Manager");

         //release the business service
         m_busServ.release();
         System.out.println("BS released ");

         //release the business component
         m_busComp.release();

         System.out.println("BC released ");

         //release the business object
         m_busObject.release();
         System.out.println("BO released ");

         // logoff
         m_dataBean.logoff();
         System.out.println("Logged off the Siebel Server ");
      }

      catch (SiebelException e)
      {
         System.out.println(e.getErrorMessage());
      }

   }

}

RemoveProperty Method for a Business Service

The RemoveProperty method removes a property from a business service. This method does not return any information.

Format

oService.RemoveProperty(propName)

Table 86 describes the arguments for the RemoveProperty method.

Table 86. Arguments for the RemoveProperty Method
Argument
Description

propName

A string that contains the name of the property that Siebel CRM must remove.

Usage

This method removes the property that the propName argument identifies from the business service that the oService parameter specifies. As a result, a subsequent call to the PropertyExists method for that property returns FALSE. For more information, see PropertyExists Method for a Business Service.

Used With

Browser Script, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

SetProperty Method for a Business Service

The SetProperty method sets a value in the property of a business service. This method does not return any information.

Format

oService.SetProperty(propName, propValue)

Table 87 describes the arguments for the SetProperty method.

Table 87. Arguments for the SetProperty Method
Argument
Description

propName

A string that contains the name of the property that Siebel CRM must modify.

propValue

A string that contains the value that Siebel CRM sets in the property that the propName argument identifies.

Usage

You can use the SetProperty method to set the value of a property of a business service from one of the methods of this business service or from an external object. For more information, see GetProperty Method for a Business Service.

Used With

Browser Script, COM Data Server, Siebel Java Data Bean, Mobile Web Client Automation Server, Server Script

Examples

For an example, see Service_PreInvokeMethod Event.

Siebel Object Interfaces Reference Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.