External Library
External Library in OwlGen serve as a mechanism to enhance and extend the platform's capabilities by allowing developers to integrate custom logic, external libraries, and third-party services. Since platform is a .NET-based Low-Code Application Platform (LCAP), extensions enable the execution of custom .NET code within the platform.
- Custom Business Logic — Implement complex business rules that go beyond built-in platform capabilities.
- Integration with External Systems — Connect to third-party services using SDK's, databases, or legacy systems.
- Reusable Components — Develop modular components that can be reused across multiple applications.
- Security & Compliance — Implement custom authentication, encryption, or validation mechanisms.
How External Libraries Work
-
Developing a library (.NET Code Development)
- Create a .NET-based extension using VS Code or Visual Studio.
- Implement the required logic as a class library.
- Define input parameters and expected outputs.
-
Registering the library in OwlGen
- Upload the compiled .NET assembly (DLL) or provide a reference to the external service.
- Configure the library metadata, including methods, parameters, and return types.
-
Using the library in logic flows
- Invoke the extension within server flows, workflows, startup extensions, background services.
- Pass required input parameters dynamically.
- Capture the output and bind it to the application logic.
-
Managing and Updating library
- Extensions can be versioned and updated without disrupting existing applications.
- Developers can replace or enhance logic as requirements evolve.
Importing External Libraries
Importing pre-built libraries into the studio minimizes the need to recreate logic, saving time and effort.
To import an external library, follow these steps:
- From the Explorer menu, right-click External Library and select Import.
- In the Import Library pop-up window, configure the required properties.
- Click Upload to complete the import process.
External Library Properties
| Property | Description | Comments |
|---|---|---|
| C# Project File* | Provide the path where the C# project file is located. | Required field. |
| Project Publish Location* | Provide the published location of the project. | Required field. |
| Description | Provide a brief summary of the library. | Optional. |
| Is Active | Specify whether the library is active (Yes/No). | Default: Yes. |
Note: Fields marked with an asterisk (*) are mandatory.
Upon successful import, the system displays the message "External Library imported successfully".
Recommendation
Using .NET Standard provides cross-platform compatibility, better reusability, broad API support, and long-term maintainability. While newer projects may prefer .NET 6+, .NET Standard remains valuable for shared libraries that must support older .NET versions and multiple runtimes.
Importing System Libraries
OwlGen provides a set of pre-built system libraries that offer commonly used functionalities out of the box. These libraries help developers accelerate application development by eliminating the need to manually implement frequently used logic and integrations.
Available System Libraries
-
ADS.AmazonSecretManager.Helper
- Purpose: Provides integration with AWS Secrets Manager for securely storing and retrieving sensitive credentials such as API keys, database passwords, and certificates.
- Use Case: Securely access secrets without hardcoding them in applications.
-
ADS.BlobStorage.Helper
- Purpose: Facilitates interaction with Azure Blob Storage, allowing users to upload, download, delete, and manage files in cloud storage.
- Use Case: Store and retrieve large media files, documents, and backups from Azure Blob Storage.
-
ADS.Cookies.Helper
- Purpose: Provides methods to create, read, update, and delete browser cookies for maintaining user session data.
- Use Case: Store user preferences, authentication tokens, and session-related data on the client-side.
-
ADS.CosmosDB.Helper
- Purpose: Enables seamless interaction with Azure Cosmos DB, a NoSQL database service. Supports CRUD operations on stored documents.
- Use Case: Store and retrieve JSON-based data in a scalable NoSQL database.
-
ADS.Email.Provider
- Purpose: Provides email-sending functionality, supporting SMTP, SendGrid, and other email services.
- Use Case: Send automated notifications, OTP emails, and system alerts.
-
ADS.EncryptDecrypt.Utils
- Purpose: Offers built-in methods for data encryption and decryption using standard cryptographic algorithms.
- Use Case: Encrypt sensitive data before storing it in the database to enhance security.
-
ADS.Excel.Helper
- Purpose: Enables reading, writing, and manipulating Excel (.xlsx) files programmatically.
- Use Case: Generate reports, process spreadsheet data, and export/import structured data.
-
ADS.FileIO.Helper
- Purpose: Provides file input/output operations, including reading, writing, and deleting files from local storage or server.
- Use Case: Manage files efficiently in local file systems or mounted storage.
-
ADS.Json.Helper
- Purpose: Provides utility functions for parsing, transforming, and manipulating JSON data.
- Use Case: Convert JSON objects, extract values, and modify structures within workflows.
-
ADS.Masking.Utils
- Purpose: Offers built-in data-masking techniques for hiding or obfuscating sensitive information.
- Use Case: Mask credit card numbers, passwords, and PII (Personally Identifiable Information) in logs and UI displays.
-
ADS.PaymentGateway.Stripe
- Purpose: Provides integration with Stripe Payment Gateway for processing online transactions securely.
- Use Case: Handle one-time payments, subscriptions, and refunds using Stripe APIs.
-
ADS.RedisCache.Helper
- Purpose: Allows interaction with Redis, an in-memory caching service, for storing and retrieving frequently accessed data.
- Use Case: Improve application performance by caching API responses and session data.
-
ADS.ServiceBus.Helper
- Purpose: Provides support for Azure Service Bus, enabling asynchronous message queuing and event-driven communication between services.
- Use Case: Enable decoupled architecture by handling message-based communication across microservices.
-
ADS.Xml.Helper
- Purpose: Provides parsing, validation, and transformation functionalities for XML data.
- Use Case: Read and manipulate XML configurations, API responses, and data exports.
Steps to Import System Libraries
- From the Explorer menu, right-click External Library and select Import System Libraries.
- In the Import System Libraries pop-up window, select the checkboxes for the required libraries.
- Click Import to complete the process.
System Library Properties
| Property | Description | Comments |
|---|---|---|
| Check Box | Select option to import a library. | - |
| System Library | Displays the library name. | - |
| Version | Select the version of the library. | - |
| Enable for Workflow | Choose whether to enable the library for workflow (Yes/No). | - |
Upon successful import, the system displays the message "System Library uploaded successfully".
Amazon Secret Manager Helper
The AmazonSecretsManagerProvider Library provides methods for securely managing and retrieving secrets from AWS Secrets Manager. It allows applications to dynamically fetch credentials, API keys, and other sensitive information without hardcoding them.
Library: ADS.AmazonSecretManager.Helper
Service: AmazonSecretsManagerProvider
Methods
1. CreateClientByRegion
Signature: void CreateClientByRegion(string region);
Description:
- Initializes an AWS Secrets Manager client using the specified AWS region.
- This method is used when AWS credentials are managed via environment variables or IAM roles.
Parameters:
- region (string) — The AWS region where the Secrets Manager service is located (e.g., us-east-1).
2. CreateClientByKeys
Signature: void CreateClientByKeys(string region, string accessKeyId, string secretAccessKey);
Description:
- Initializes an AWS Secrets Manager client using explicit AWS credentials.
- This method is useful when accessing AWS from an environment where IAM roles are not available.
Parameters:
- region (string) — The AWS region where the Secrets Manager service is located.
- accessKeyId (string) — The AWS Access Key ID.
- secretAccessKey (string) — The AWS Secret Access Key.
3. GetSecretValue
Signature: Task<string> GetSecretValue(string secretName);
Description:
- Retrieves the secret value stored in AWS Secrets Manager.
- Returns the plaintext version of the secret as a string.
- This method is asynchronous and should be awaited.
Parameters:
- secretName (string) — The name of the secret stored in AWS Secrets Manager.
Returns: Task<string> — The value of the retrieved secret.
Example Usage
Creating a Client and Retrieving a Secret