Rubrique précédente: Overview

Rubrique suivante: API Reference List

Integration Development Framework

The development framework provides several tools to facilitate the process of integration scripts development:

Name

Description

OnLoad

Called once when the script starts. It can be used for initialization of global variables.

OnTranslationEvent

Called for every translation entry that answers to the script filter. It gets one parameter as input parameter: EntryDetails. (This parameter is a TranslationEntry component).

Main

Called once after the OnLoad and after the OnTranslationEvent functions. It can be used to write code that reads data from external data source and updates the resources, event types, services, and contract parties tables in CA Business Service Insight.

Result()

Function that is called after the Main procedure. It returns a string that will be inserted to the LastResult field that can be viewed in the translation scripts list page or in the translation script details page.

In addition to the above, the following objects are provided as part of the framework library:

For more information, see API Reference List.

Safe and unsafe running modes

A script that is indicated as Safe cannot do any harm to the environment where run, by accessing directly the database or the file system. In addition, it cannot use CA Business Service Insight internal components (CA Business Service Insight COM objects). Safe script can use only safe objects that were defined by CA Business Service Insight in advance. The safe mode is the default mode.

A script can be changed to run in unsafe mode, and can then access databases in write-mode, create and delete files from the file system, and use CA Business Service Insight internal components (CA Business Service Insight COM objects). A script can be changed to unsafe mode only directly in the database, so as to prevent unauthorized users from creating such scripts. See also: LDAP Integration Steps and Translation Scripts-User Function Scripts Examples.

Important Note: CA Business Service Insight COM objects have an XML interface that can change between versions. When using the methods of CA Business Service Insight COM objects, these are handled by their transactions and open other transactions. It is in these subsequent transactions that the commit will be done whenever a method is finished. Updates already committed will not be rolled back if an error occurs in the middle of the script, only the updates in the effected method will be rolled back. Furthermore, the XML interface of the CA Business Service Insight COM object may change and will cause the script to produce run time errors. The use of the unsafe mode is recommended in scripts only for special cases, such as reading from external data sources.