AI

abstract class AI : CodBi, IPluginServletAction

Base for all classes related to CodBi / AI.

In order to enable the re-usage of images that were already uploaded, this class sets up a cache (cacheIDedImages) that is managed by a janitor (janitorIDedImages) with a specific expiration time for the images defined (msExpirationIDedImages). DSGVO Notice: IDed images are temporarily stored as files on the server.

A dedicated logger posts messages in following manner to the console [[ CodBi / AI / idLogMessages ] ...message... ].

AI on Formcylce server benefits

  • Lean Compliance: Simpler DSGVO and EU AI Act handling. Most easy approval from your Data Protection Officer (DSGVO), No Data Transit Mapping, No extra TOMs, no extra VVTs.

  • Infrastructure Efficiency: No second OS to patch, monitor, or license. Dramatically lowers TCO (Total Cost of Ownership) and prevents "server sprawl."

  • Maximum Performance: Zero network latency. Localhost communication bypasses the physical network, ensuring the fastest possible data exchange between Formcycle and the AI.

  • Simplified Security: No internal API ports to open or protect. Data never leaves the machine, eliminating the need for complex mTLS or inter-server encryption.

  • Unified Maintenance: Single-point backups ensure the application and AI model are always in sync. Debugging is faster with all logs centralized on one filesystem.

Bottom Line: Hosting on the same server is the most pragmatic, cost-effective, and low-maintenance approach for high-speed, internalized workflows.

Plugin Properties

PropertyTypeDefaultDescription
AI_CachedImageExpirationLong600000Time in ms before a cached image expires and is purged by the janitor

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
data class CachedImage(val file: File, val timestamp: Long = System.currentTimeMillis())

Stores File and timestamp so we can clean up old ones that passed the msExpirationIDedImages.

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract fun execute(p0: IPluginServletActionParams): IPluginServletActionRetVal
Link copied to clipboard
Link copied to clipboard
open override fun getDisplayName(p0: Locale): String
Link copied to clipboard
abstract override fun getName(): String
Link copied to clipboard
open override fun initialize(configData: IPluginInitializeData)

Initializes the AI components by reading configuration properties. Specifically, it acquires the msExpirationIDedImages from the plugin property "AI_CachedImageExpiration". Subclasses should call this method at the beginning of their own initialize implementation.

Link copied to clipboard
open fun initPlugin()
Link copied to clipboard
open fun install(p0: IPluginInstallData)
Link copied to clipboard
open override fun shutdown(shutdownData: IPluginShutdownData?)

Shuts down the janitor (startJanitor) and removes all cached images (cacheIDedImages).

open fun shutdown()
Link copied to clipboard

Initiates a task that removes unused images that're expired (msExpirationIDedImages) from the cache (cacheIDedImages).

Link copied to clipboard
open fun uninstall(p0: IPluginUninstallData)
Link copied to clipboard
open override fun validateConfigurationData(configData: IPluginValidationData): IPluginInitializeValidationResult?

Rejects tenant-level installation. CodBi must be installed as a system plugin because its AI services (Whisper, LLAMA) bind local server ports and manage heavyweight processes that would conflict when instantiated once per tenant.