Skip to content

Martini Invoking Services via a Tracker Resubmit Trigger

The Tracker Resubmit trigger is a custom Martini trigger designed to work in conjunction with the Tracker search index. Logging transactions in Tracker creates an audit trail for every transaction and their state, enabling error discovery. This trigger allows users to address errors and retry failed transactions using either the original service or a custom service designed for handling such failures.

Overview

This trigger must be registered against a specific Tracker document type and an associated state. It becomes active for documents matching the specified type and state, allowing users to specify which service the Tracker Resubmit trigger should invoke upon being triggered. Upon activation, a "resubmit option" appears in the Tracker UI for applicable documents, facilitating the retry of failed transactions.

Properties

General Configuration

Name Default Description
Name (none) The name of the trigger.
Service (required) The service to execute when the trigger is activated.
Auto Start true Whether the trigger should automatically activate upon package startup.

Tracker Resubmit-Specific Configuration

Name Default Description
Document Type Tracker Resubmit The type of Tracker document this trigger can be invoked from.
State (required) The state of the Tracker document this trigger can be invoked from.

Service Parameters

The service executed by the Tracker Resubmit trigger receives parameters that provide context about the transaction being retried:

Name Type Description
document Document The Tracker document object being resubmitted.
externalId String The external ID of the Tracker document.
documentType Type The document type object for the resubmission.
documentTypeId String The ID of the Tracker document type.
stateId long The state ID of the Tracker document at resubmission.
stateName String The name of the document's state at resubmission.
senderId String The sender ID of the Tracker document.
receiverId String The receiver ID of the Tracker document.
userName String The user name associated with the Tracker document.
documentState State The document state object at resubmission.
inputStream InputStream The content of the document state as an InputStream, if available.
reader Reader The document state's content as a Reader, if available.
bytes byte[] The content of the document state in bytes, if available.
content String The document state's content as a String, if available.
file Path A temporary file containing the document state's content, if available.

Utilizing the Tracker UI for Resubmission

The Tracker UI integrates a resubmit option for documents eligible under the configured trigger, streamlining the process of retrying failed transactions. This functionality enhances the manageability and recovery capabilities within Martini's transaction processing framework.