Developing and Deploying Siebel Business Applications > Code for NREC Business Services > Process of Modifying Siebel Objects >

Code for the Service Function


Copy the following code to the Service_PreInvokeMethod function:

Function Service_PreInvokeMethod (MethodName As String, Inputs As PropertySet, Outputs As PropertySet) As Integer

   Dim ParamText as String

'**********************************************************************************
'* SYSTEM DEFINITION SECTION
'*
'* The Calling V.BusComp must include the following parameters
'*
'* Service Name = Pal Mk2 (Unless Renamed)
'* Service Parameters = <Full Path & DataFile Name>;
'*       <No Of Columns in File>;
'*       <Columns in Calling VBC comma separated>
'*
'* e.g Service Parameters = c:\Siebel\Data.VBC;5;KeyId,FName,LName,Age,DOB
'*
'**********************************************************************************

' Identify the Context the Service is Called from and setup parameters

   VBCName = Inputs.GetProperty("Business Component Name")
   ParamText = me.GetProperty(VBCName)
   If ParamText <> "" Then
      DataSource = Left(ParamText,Instr(ParamText,";")-1)
      ParamText = Mid(ParamText,Instr(ParamText,";")+1)
      FieldCount = CVar(Left(ParamText,Instr(ParamText,";")-1))
      ColumnsReqd = Mid(ParamText,Instr(ParamText,";")+1)
   End If

' Handle the Method

   If MethodName = "Init" Then
      Pal_Init Inputs, Outputs
      Service_PreInvokeMethod = CancelOperation
   ElseIf MethodName = "Query" Then
      Pal_Query Inputs, Outputs
      Service_PreInvokeMethod = CancelOperation
   ElseIf MethodName = "Update" Then
      'Pal_Update Inputs, Outputs - Not Yet Completed
      Service_PreInvokeMethod = CancelOperation
   ElseIf MethodName = "PreInsert" Then
      Pal_PreInsert Outputs
      Service_PreInvokeMethod = CancelOperation
   ElseIf MethodName = "Insert" Then
      Pal_Insert Inputs, Outputs
      Service_PreInvokeMethod = CancelOperation
   ElseIf MethodName = "Delete" Then
      'Pal_Delete Inputs - Not Yet Completed
      Service_PreInvokeMethod = CancelOperation
   Else
      Service_PreInvokeMethod = ContinueOperation
   End If

End Function

Developing and Deploying Siebel Business Applications Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.