Understanding External Functions - Intergraph Smart Instrumentation - Customization & Programming - Intergraph

Intergraph Smart Instrumentation Programmer's Guide

Language
English
Product
Intergraph Smart Instrumentation
Search by Category
Customization & Programming
Smart Instrumentation Version
2018 (12.0)

External functions are controlled by Smart Instrumentation Rule Manager. External functions are the implementation of the spiExtendedService Interface, which is part of SPIExternalService.dll file supplied with Smart Instrumentation.

Rule Manager allows you to define two external function types:

  • Validation

  • Update

Smart Instrumentation Rule engine interfaces with Smart Instrumentation core objects. These objects are called business objects. At runtime, these objects use the rule engine. By creating rules which are defined as external functions, the rule engine can invoke your customization code at runtime, every time you create, modify, or associate an item in Smart Instrumentation.

The rule engine invokes your assembly component based on its signature which is the C# or VB .NET Assembly name and class name.

spiExtendedService Interface Definition

The spiExtendedService.dll file is an interface developed for .NET Framework. It includes the following objects:

Object

Type

Description

CalcReturnInfo

struct

Used as a container of data that the external functions return to the Rule Manager.

ParmInfo

struct

Used as a container of data that external functions receive from the Smart Instrumentation rule engine.

spiTransaction

class

External functions use this object to access the Smart Instrumentation database connection collection based on the current login. Also, you can use this object to query the database.

spiExtendedService Interface

Method

Return Type

Description

ErrDesc

Property

Used by the Rule engine to display errors to Smart Instrumentation users.

ErrCode

Property

Used by the Rule engine to display an error number to Smart Instrumentation users.

CustomCalculation

CalcReturnInfo

Enables a programmer to control the values of selected attributes in a particular rule definition.

CustomValidation

bool

Enables a programmer to extend a core validation in Smart Instrumentation.