How to connect AND GeoAccess to Siebel

Introduction

This document describes the steps to be taken in order to connect to AND GeoAccess to Siebel.

Virtual Business Component

  • Create a Virtual Business Component (VBC) in Siebel and base it on a custom business service.
  • A VBC is based upon a Business Component (Class: CSSBCVExtern) and a Business Service (Class: CSSService).
  • For using a VBC it is mandatory to code (either in VB-script or Java script) the methods you want to use.
  • Some of the methods are executed automatically, so these need to be coded as well.

Init Method

  • The init call returns the list of columns it supports.

Function Init (Outputs)

{

// identify the fields used in the VBC

Outputs.SetProperty ("Country","");

Outputs.SetProperty ("Street","");

Outputs.SetProperty ("Premise","");

Outputs.SetProperty ("Name","");

Outputs.SetProperty ("City","");

Outputs.SetProperty ("PostCode","");

Outputs.SetProperty ("SubscriptionKey","");

Outputs.SetProperty ("UseCleanseSearchMethod","");

Return (CancelOperation);

}

Query Method

  • Code the query call to execute a workflow which will perform all the ‘work’ as follows. To extract the fields and pass these to the workflow you will have to write some code.

function Query(Inputs)

{

var workflowSvc = TheApplication().GetService("WorkflowProces Manager");

var workflowInputs = TheApplication().NewPropertySet();

var tmpOutput = TheApplication().NewPropertySet();

var ProcessName = "Workflow AND GeoAccess"

var Country = "";

var Street = "";

var Premise = "";

var Name = "";

var City = "";

var PostCode = "";

var SubscriptionKey = "";

var UseCleansSearchMethod = "";

try

{

Country = Inputs.GetChild(0).GetProperty("Country");

Street = Inputs.GetChild(0).GetProperty("Street");

Premise = Inputs.GetChild(0).GetProperty("Premise");

Name = Inputs.GetChild(0).GetProperty("Name");

City = Inputs.GetChild(0).GetProperty("City");

PostCode = Inputs.GetChild(0).GetProperty("PostCode");

SubscriptionKey = Inputs.GetChild(0).GetProperty("SubscriptionKey");

UseCleanseSearchMethod = Inputs.GetChild(0).GetProperty("UseCleanseeSearchMethod")

workflowInputs.SetProperty ("ProcessName", processName);

workflowInputs.SetProperty ("Country",Country);

workflowInputs.SetProperty ("Street",Street);

workflowInputs.SetProperty ("Premise",Premise);

workflowInputs.SetProperty ("Name",Name);

workflowInputs.SetProperty ("City",City);

workflowInputs.SetProperty ("PostCode",PostCode);

workflowInputs.SetProperty ("SubscriptionKey",SubscriptionKey);

workflowInputs.SetProperty ("UseCleanseSearchMethod",UseCleanseSearchMethod);

var outPS = TheApplication().NewPropertySet();

workflowSvc.InvokeMethod("RunProcess",WorkflowInputs,outPS);

var i=0;

var PSName;

while (i < outPS.GetChildCount ())

{

tmpOuput = outPS.GetChild(i).Copy();

PSName = tmpOutput.GetType();

if (PSName == “PropertySet”) { break; }

i++

}

return (tmpOutput);

} catch (e) {return (CancelOperation);}

}

PreInvokeMethod Method

  • Code the PreInvokeMethod to propagate the method calls for Init and Query. This is also the place to capture the data entered by the user for executing the Query Method.

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)

{

if (MethodName == "Init")

{

return(Init(Outputs));

}

else if (MethodName == "Query")

{

try

{

var tmpOutput = TheApplication().NewPropertySet();

var j = 0 ;

tmpOutput = Query (Inputs)

while (j < tmpOutput.GetChildCount())

{

Outputs.AddChild(tmpOutput.GetChild(j).Copy());

j = j + 1;

}

return (CancelOperation);

}

catch (e)

{

TheApplication().RaiseErrorText("Error: " + e);

return (CancelOperation);

}

}

else

return (ContinueOperation);

}

Create Workflow

Start / The start step
Create SOAP XML / This steps needs to create some XML. It can use any mechanism you like to use (e.g. Siebel EAI Adapter, …)
Transform to UTF-8 / You need to transform the XML into the codepage the external system expects
Call AND GeoAccess Webservice / Dump the XML to the external system using the transport it supports.
XSLT Transform / You transform the external XML into the format required by Siebel using XSLT.
To Property Set. / Using the XML Converter (XML to Property Set) you convert the XML into the ‘PropertySet’ property.
End. / The End.

Appendix