Skip to content

Extension exit events

Ryan Newington edited this page Sep 4, 2025 · 7 revisions

Extension Exit Events

Extension Exit Events provide a powerful extensibility mechanism that allows you to integrate custom .NET code directly into ACMA's object processing pipeline. These events enable sophisticated custom business logic, external system integration, and specialized processing that goes beyond ACMA's built-in capabilities.

Purpose and Capabilities

Extension Exit Events enable:

  • Custom business logic: Implement complex algorithms and calculations
  • External system integration: Connect with APIs, databases, and web services
  • Specialized processing: Handle unique requirements not covered by built-in features
  • Real-time notifications: Send alerts, emails, or messages during object processing
  • Data validation: Perform complex validation that requires external data sources
  • Audit and compliance: Implement custom audit trails and compliance reporting

Technical Implementation

Interface Requirements

All extension events must implement the IAcmaExternalEventExtensible interface:

public interface IAcmaExternalEventExtensible
{
    void Execute(RaisedEvent raisedEvent);
    void OnEventRaised(RaisedEvent raisedEvent, MAObjectHologram sender);
}

Configuration Parameters

Basic Event Settings

Event Identity

  • Event Name: Unique identifier across all ACMA events
  • Naming convention: Use descriptive names that reflect event purpose
  • Examples: UserCreationNotification, ExternalAPISync, ComplianceValidation

Administrative Controls

  • Event Is Disabled: Temporarily disable event without removing configuration
  • Use cases: Testing, maintenance, debugging, phased deployments
  • Impact: Disabled events are never raised or executed

Assembly Configuration

Extension Path

  • Purpose: Specifies location of DLL containing extension implementation
  • Path types: Absolute paths or relative to ACMA installation directory
  • Best practice: Use relative paths for portability
  • Example: Extensions\CustomValidation.dll

Class Name

  • Format: Fully qualified class name including namespace
  • Requirements: Class must implement IAcmaExternalEventExtensible interface
  • Example: MyCompany.ACMA.Extensions.UserValidationExtension
  • Validation: ACMA validates class existence and interface implementation at startup

Execution Configuration

Execute Event Asynchronously

Synchronous Mode:

  • Behavior: ACMA waits for event completion before processing next object
  • Performance: Sequential processing with guaranteed completion order
  • Error handling: Can abort export operation and return errors to sync engine
  • Use cases: Critical validations, required external updates, error-sensitive operations

Asynchronous Mode:

  • Behavior: Events run on separate threads while ACMA continues processing
  • Performance: Parallel processing with improved throughput
  • Completion: ACMA waits for all async events before signaling export completion
  • Use cases: Notifications, logging, non-critical external updates

Error Handling Strategy

Synchronous Error Handling:

  • Abort operation: Stop export for current object and return error
  • Continue with error: Log error but continue export operation
  • Retry mechanisms: Implement custom retry logic within extension
  • Error propagation: Errors returned to Microsoft Identity Manager sync engine

Asynchronous Error Handling:

  • Logging only: Errors logged to ACMA log file
  • No export impact: Errors don't affect export operation completion
  • Custom handling: Implement custom error handling within extension
  • Monitoring: Monitor logs for async event failures

Practical Implementation Examples

User Creation Notification

Purpose: Send welcome email when new users are created
Implementation: SMTP client integration
Execution Mode: Asynchronous
Error Handling: Log errors, don't block user creation

External System Synchronization

Purpose: Update external HR system when employee data changes
Implementation: REST API calls
Execution Mode: Synchronous
Error Handling: Abort on failure to maintain data consistency

Compliance Audit Trail

Purpose: Log privileged access changes to compliance database
Implementation: Database connection with custom audit schema
Execution Mode: Asynchronous
Error Handling: Log failures, implement retry mechanism

Security Validation

Purpose: Validate security clearance against external security system
Implementation: Web service integration
Execution Mode: Synchronous
Error Handling: Abort operation if validation fails

Clone this wiki locally