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 workflow, or a custom service or workflow 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 or workflow 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.
Usage in Workflows
To learn how to setup and use the Tracker Resubmit trigger in workflows, see Martini Workflows Trigger Nodes
Usage in Services
To learn how to setup and use the Tracker Resubmit trigger in services, see Invoking Services via a Trigger
Properties
General Configuration
| Name | Default | Description |
|---|---|---|
| Name | (none) | The name of the trigger. |
| Service or Workflow | (required) | The service or workflow 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. |
| Label | (none) | An optional label used to select this trigger during resubmission. If omitted, the trigger Name is used. |
| Auto Resubmit | false |
Whether this trigger is eligible for automatic resubmission when the configured state is reached. |
Labels do not need to be unique. If several triggers for the same document type and state use the same label,
selecting that label runs every matching trigger. An unlabeled trigger is discoverable by its trigger Name.
Parameters
The service or workflow 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.
Selecting a resubmission
For a document state that has resubmission triggers, Tracker can discover the available labels and display them as resubmission choices in a dialog. Choosing All runs every matching trigger, which is equivalent to omitting a label; choosing a label runs only the matching trigger or triggers. Existing resubmissions without a label retain the all-trigger behavior. All is a UI-only display option and is not itself a valid value accepted by the Tracker API.
Resubmitting via the Runtime API
The Runtime API exposes the same behavior. Discover the available labels for a document state:
1 | |
Use the returned labels to populate a selective-resubmission control, then submit either an all-trigger request:
1 | |
or a label-filtered request:
1 | |
The stateId identifies the state whose content is resubmitted. A label applies only to triggers registered for that
document type and state; duplicate labels intentionally select all triggers sharing that label.