Module: ActionTemplateService

Action Template Service Layer This service manages action templates in the CommTool system. Action templates define the structure and behavior of actions that can be executed by bots. Key concepts: - Action Templates: Reusable templates that define action structure and UI - Organizations: Templates belong to specific organizations - Bots: Can be linked to action templates to execute actions - Multi-tenancy: Each organization has isolated templates Database structure: - ObjectBase: Main table storing templates with Type='actionT' - Links: Junction table linking bots to action templates
Source:

Members

(static, constant) createActionTemplate

Create a new action template Creates a new action template for the current organization. This is used when registering templates from bots.
Source:
Create a link between a bot and an action template This function establishes the relationship that allows a bot to execute actions based on a specific action template. The relationship is stored in the Links table and enables the bot discovery system.
Source:

(static, constant) deleteActionTemplate

Delete an action template and all associated data This function performs a cascading delete of an action template, removing all related data to maintain database integrity. It's a comprehensive cleanup operation that affects multiple tables.
Source:

(static, constant) getActionTemplate

Get a single action template by UID Retrieves a specific action template with its complete data structure. Used for template editing, viewing details, and bot execution contexts.
Source:

(static, constant) getActionTemplatesForBot

Get all action templates associated with a specific bot Retrieves action templates that are linked to a bot through the Links table. This enables bots to discover which action templates they can execute. Includes organization information for multi-tenant context.
Source:

(static, constant) getActionTemplatesForOrg

Get all action templates for a specific organization Retrieves action templates that belong to an organization. These templates define the structure and behavior of actions that can be created within the organization's context.
Source:

(static, constant) getOrganizationsByUIDs

Get organizations by their UIDs Utility function to retrieve organization details for multiple organizations. Used for batch operations and providing organization context in templates.
Source:

(static, constant) propagateDefaultsToActions

Propagate template default changes to all actions of a template. Computes the full set of defaults (UI field defaults + template.defaults) and updates every action that belongs to this template. Only virgin fields (those NOT listed in action.modifiedFields) are overwritten with the new default value. User-modified fields are left untouched.
Source:

(static, constant) restartActionTemplate

Restart an action template This function sends a restart signal to the bots that defined the specified action template. It's used to update call the onStartup function of the bot part without requiring a full bot restart.
Source:

(static, constant) updateActionTemplate

Update an existing action template Updates an existing action template identified by UID. Requires the template to exist and belong to the current organization.
Source: