Active Scripts

Scripts are a mechanism where business logic can be implemented using a procedural programming language. Ideally, most business rules should be represented using a declarative format such as Decision Tables or Rete Rules. Scripts can be useful however when the business logic is procedural, or when developers need additional tools to work around any potential "brick walls" in the development of business rule solutions. Scripts can also be used to build comprehensive unit and regression tests for your business rules.

The Active Script rule format provides a mechanism that allows business rules to be implemented using a range of procedural programming languages that support the ActiveX scripting engine standard. Refer to Microsoft Windows Script Technologies Home Page for further details on ActiveX scripting.

Active Script Rule Format

Common Knowledge extends the standard Active Scripting implementation to allow scripts written in languages such as VBScript, JScript, ActivePerl and ActivePython to be fully integrated with the Common Knowledge architecture. The ActiveScript rule format can be easily combined with other rule formats to create powerful solutions to complex business rule problems.

Overview

The Common Knowledge ActiveScript rule format provides capabilities in a number of areas to enable you to implement procedural logic to complement your declarative business rules:

Active Scripting Standard Full support for the ActiveX Scripting engine standard
Supported Languages Choice of Active Script languages including: VBScript, JScript, and ActivePerl
Advanced Editor Easy-to-use Active Script editor that supports colour syntax highlighting, code-folding and debugging support
Interactive Execution Standalone execution of Active Scripts entirely within Common Knowledge Designer
Language Extensions Additional language features to enable Active Scripts to be fully integrated with the Common Knowledge architecturerule formats

Features

The Common Knowledge Active Script rule format incorporates an ever-growing list of features that assist you during the design, authoring, execution and testing of procedural logic. Features include:

Windows Integration Access all ActiveX enabled technologies and products such as Microsoft® Office automation, WMI (Windows® Management Instrumentation), ADO, SOAP, XML, ADS, MSMQ, and .NET
Nested Rules Common Knowledge rule formats may be executed directly from your Active Script code
Language Ability to work directly with the elements of Common Knowledge Contexts and with other rule formats directly from your Active Scripts
Integrated Debugger Debugger to step through scripts line by line or stop on breakpoints. Use the Eval/Modify Window to examine current values of Active Script variables. Use the Call Stack Window to see the current execution path
External Debugging Option to enable external debugging using the Microsoft Script Debugger
Error Reporting Build errors may be traced directly to the errant lines within an Active Script
Interactive Execution Interactive prompting for variable values when executing Active Scripts within Common Knowledge Designer