Quick question; will the following code snippet work ?
Business Service : BS1, contains only this code
function function1 ()
There is no code in any other event/function of this BS. And now, the attempt is to trigger this BS via the following code:
var bs = TheApplication().GetService("BS1");
Now there is something wrong about the second code snippet, right ? This is not the usual way to invoke a Business Service Method. The practise is to use the InvokeMethod command, passing property sets for input and output. But here is the output of running these in Siebel 8
This is an example of Script Libraries feature from Siebel 8 onwards. Developers can write multiple functions in business services, and then these functions get exposed , and the functions can be invoked directly as you would do on C/C++/Java. There is no need of adding code in Service_PreInvokeMethod event to expose the functions.
There are limitations though, such a business service’s functions can be invoked only via scripting. They cannot be used in WFs or BRPs. But if your functionality calls for lots of scripting, this feature surely comes in handy.
Happy Scripting !