Chapter I - Introduction
1.1 What is this Spelłbook about?
This Spelłbook, although not a complete nor reference guide to the SpEL language itself, aims to be the only document you will need to look at, whether you are starting with the SpEL language in tSM, have been working with it for a while and are interested in what else it can offer, something is currently not working as you expect in the script, you need to refresh any of its areas, or simply you just need to have a list of most methods and functions in one comprehensive list.
1.2 What is tSM SpEL?
„tSM SpEL“ is a customized version of the Spring Expression Language (SpEL) specifically tailored for the Telco Service Management (tSM) platform. It is designed to allow for dynamic and flexible scripting within the tSM environment, enabling users to define expressions, scripts and logic for various operations and scenarios.
1.3 Where it is used in the tSM
tSM utilizes SpEL in various places for dynamic scripting on the backend. The main areas include:
- tSM Process Engine expressions: Enabling dynamic expressions within the tSM Process Engine.
- tQL Custom Calculations: Allowing for custom calculations in tQL.
- SLA / KPI Calculations: Facilitating the calculation of Service Level Agreements and Key Performance Indicators.
- Dynamic Fields Form Configuration: Supporting dynamic configuration of form fields based on specified conditions.
1.4 Advantages of SpEL in the tSM
In most cases, when creating logic for any module or process in tSM, multiple larger data structures are often manipulated in one step, and there is almost always some entity whose information needs to be easily accessible at any moment (such as order data).
These are precisely the advantages of the SpEL language. Conceptually, it provides a flexible way to manipulate objects and dynamically access their properties, enabling a wide range of operations on various data types. Additionally, it is designed to operate within the context of the entity being manipulated (e.g., order, ticket, process, task), which simplifies working with data related to that entity.
What does its customization "tSM SpEL" offer additionally? The customization "tSM SpEL" additionally offers several essential benefits that make it an excellent choice for creating logic applications in the tSM environment. Briefly, these include:
- Dynamic Expression Evaluation: Allows for the dynamic evaluation of expressions at runtime, enabling more flexible and adaptable logic.
- Simplified Configuration: Facilitates the configuration of complex business rules and logic without the need for extensive coding.
- Integration with tSM Services: Seamlessly integrates with tSM's built-in services, allowing for powerful and concise scripting.
- Enhanced Readability: Promotes the use of readable and maintainable expressions, improving overall code quality.
- Advanced Data Types Manipulation: Includes additional methods to easily manipulate various data types, including string, number data types, maps, lists, arrays, dates, objects, JSON nodes, and more.
- Enhanced Context Variables: Provides a richer set of context variables specific to tSM processes and workflows, allowing for more context-aware scripting.
- Advanced Collection Operations: Supports advanced operations on collections, such as filtering, sorting, and projection.
- Flow Control Constructs: Offers robust flow control constructs, including conditional expressions, loops, and error handling mechanisms.
- JSON Handling: Provides functions for converting between JSON strings and structured JSON objects for easier data processing.
- Specialized Error Handling: Includes specialized mechanisms for error handling and debugging within the tSM environment.
1.5 Structure of this Spelłbook
This Spelłbook is organized into six main chapters. You've nearly finished the first one (Chapter I - Introduction). The next chapter (Chapter II - SPEL in a Nutshell) provides a high-level summary and highlights key concepts, methods, and functions mainly through short examples.
The following chapter (Chapter III - In-Depth) offers detailed explanations, including usage examples and tutorials for all topics mentioned in the previous chapter. The subsequent chapter (Chapter IV - Examples) provides comprehensive, real-world examples, use cases, and best practices.
The penultimate chapter (Chapter V - Reference) offers a reference list of built-in methods with examples. Finally, the last chapter (Chapter VI - Cheat Sheet) serves as a quick reference guide with common patterns, idioms, and shortcut keys for efficient use of tSM SpEL.
In summary:
Chapter | Description |
---|---|
Chapter I - Introduction | An overview of what tSM SpEL is and what this Spellbook aims to achieve. |
Chapter II - SPEL in Nutshell | A high-level summary highlighting key concepts, methods, and functions of tSM SpEL. |
Chapter III - In-Depth | Detailed explanations, usage examples, and tutorials for all topics. |
Chapter IV - Examples | Comprehensive, real-world examples, use cases, and best practices. |
Chapter V - Reference | A reference list of built-in methods with examples. |
Chapter VI - Cheat Sheet | A quick reference guide with common patterns, idioms, and shortcut keys for efficient use of tSM SpEL. |