Skip to content

Invoking Services via a Trigger

Overview

Triggers in Martini automatically invoke services when specific events occur, enabling event-driven services without manual intervention. This powerful automation capability helps you build responsive applications that react to file changes, incoming messages, scheduled times, or HTTP requests.

What You Will Learn

  • Available Trigger Types you can use to invoke services and when to use them
  • Step-by-step process for adding triggers to your Martini package
  • Configuration requirements for different trigger types
  • Best practices for trigger-based service invocation

When To Use This

Use triggers when you need to automatically start services based on external events or conditions:

  • Start a service automatically in response to events, schedules, or incoming messages
  • Integrate external systems or services to trigger Martini services

Prerequisites

Supported Martini Trigger Types For Services

Martini supports several trigger node types for invoking services, each designed for specific automation scenarios and event sources.

Visit each trigger's documentation page to learn more about its setup and configuration in detail.

Message Broker Integration Triggers

Start services automatically when messages arrive from external broker systems or message queues.

File System and Directory Monitoring Triggers

Start services when files or directories change, enabling automated file processing services.

HTTP Request and Web Integration Triggers

Start services based on incoming HTTP requests and web-based interactions.

Communication and Messaging Triggers

Start services when receiving external communications like emails or instant messages.

  • Email Trigger - Process incoming email messages automatically
  • XMPP Trigger - Handle instant messaging protocol communications

Data Change and Subscription Monitoring Triggers

Start services when new data becomes available or subscription sources update.

Time-Based and Scheduled Execution Triggers

Start services on predetermined schedules or time-based intervals.

Transaction Recovery and Error Handling Triggers

Start services to retry failed transactions or address system errors by reprocessing documents.

Adding Service Triggers to Your Martini Package

Service Triggers enable automatic service invocation when specific conditions are met. Follow these steps to add triggers to your Martini package.

Getting Started with Trigger Creation

To invoke services via triggers, you must add a Service Trigger within the package containing your target services.

  1. In your Martini Package Navigator, right-click Service Triggers
  2. Hover over New, then select Trigger from the context menu
  3. The Create a Trigger dialog box opens with configuration options

Expected result: The trigger creation dialog displays with package, type, and name fields ready for configuration.

Trigger Creation Configuration Properties

Configure these essential properties when creating your trigger:

Property Example Value What It Controls
Package mypackage Target package location (verify and change if needed)
Type Scheduler Trigger Trigger type determining activation conditions and behavior
Name DailyDataSync Descriptive identifier for the trigger in your package

How Trigger Configuration and Service Binding Works

After creating your trigger, Martini automatically opens the configuration interface where you specify which service to invoke and define trigger-specific settings.

  1. Service Selection: Click the Browse button next to the Service field
  2. Service Binding: Select the service you want to execute when the trigger activates
  3. Configuration: Add trigger-specific settings (varies by trigger type - visit individual trigger documentation for detailed configuration options. See Supported Martini Trigger Types For Services)
  4. Save your trigger configuration using Ctrl + S or the save icon
  5. Start the trigger using the Start button on the toolbar on the top right

Expected result: Your configured trigger appears under Service Triggers in the Navigator, ready to automatically invoke your selected service when the configured conditions are met.

Trigger Configuration Benefits and Use Cases

Trigger-based service invocation eliminates manual service execution and enables true automation. By configuring triggers properly, you create responsive systems that handle events without human intervention, improving efficiency and reducing operational overhead.

Common automation scenarios include processing uploaded files immediately, responding to API requests in real-time, running scheduled maintenance tasks, and handling message queue processing automatically.

Troubleshooting

Common issues when configuring and using service triggers in Martini packages.

Problem Detection Cause Fix Affected Versions
Trigger not appearing in list Service Triggers folder shows empty Wrong package selected Verify package selection in creation dialog All versions
Service not executing Trigger conditions met but no service runs Service binding not configured Click Browse and select target service All versions
Save operation fails Cannot save trigger configuration Missing required configuration Complete all required fields before saving All versions

Helpful Resources