Skip to content

Overview

Concepts and Principles

Development

Overview

IDEs

API Explorer

Releases

Release Notes

TORO Integrate

Coder Studio

Coder Cloud

Bug Reports

Search

Tracker Resubmit Endpoint

The Tracker Resubmit Endpoint is a custom Integrate endpoint used in conjunction with the Tracker Search Index. Logging transactions in Tracker provides an audit trail for every transaction and their state. Should a transaction fail for any reason, the error can be discovered using data stored in the Tracker Search Index. The Tracker Resubmit Endpoint enables a user to arbitrage errors and then retry failed transactions by either processing them through the original service or a custom service that may have been designed to handle failed transactions.

The Tracker Resubmit Endpoint needs to be registered against a Tracker document type and an associated state. The endpoint will be active against documents that are of the same type and state. You then specify which service should be invoked by the Tracker Resubmit Endpoint should it get triggered. When the endpoint is finally started, a resubmit option is added to the Tracker UI1 (highlighted below):

Option for resubmitting documents via the UI

Option for resubmitting documents via the UI

Option for resubmitting documents via the UI

In the UI above, the Tracker Resubmit Endpoint is registered for Tracker documents of type JMS with the state Started. When the resubmit option is clicked, the service associated to this endpoint is executed.

Properties

Name Required Default Description
Service Yes null The service to execute when the endpoint is triggered
Document Type Yes "Tracker Resubmit" The type of Tracker document to register this endpoint to
Document State Yes "Started" The state of the Tracker document in which this endpoint is invocable from

Service

When the endpoint is triggered, the following variables are exposed to the registered service:

Name Type Description
parameters java.util.Map A map containing all variables below.
document Document The Tracker document object that the re-submit is being performed on.
externalId java.lang.String The Tracker document external ID.
documentType DocumentType The Tracker document type object that the re-submit is being performed on.
documentTypeId java.lang.String The Tracker document type ID.
internalId java.lang.String The Tracker document internal ID.
stateName java.lang.String The Tracker document state name that the re-submit is being performed on.
senderId java.lang.String The Tracker document sender ID.
receiverId java.lang.String The Tracker document receiver ID.
userName java.lang.String The Tracker document user name.
documentState DocumentState The Tracker document state object that the re-submit is being performed on.
documentStateContent DocumentStateContent The Tracker document state content object that the re-submit is being performed on. If the state has no content, this will be null.
inputStream java.io.InputStream The document state's content as an InputStream. This stream will point to the actual content of the document state. If there is no content, this will be null.
reader java.io.Reader A reader for the document state's content. This reader will point to the actual content of the document state. If there is no content, this will be null.
bytes byte[] The document state's content in bytes. If there is no content, this will be null.
content java.lang.String The document state's content, expressed as a string. If there is no content, this will be null.
file java.io.File The document state's content, ported in a file. This is a temporary file that will be deleted after your endpoints are invoked. It will point to a file containing the actual content of the document state. If there is no content, this will be null.

Example

Consider the following Tracker Resubmit Endpoint configuration:

Tracker Resubmit Endpoint, sample configuration

This registers the Tracker Resubmit endpoint for Tracker documents of type JMS with the state Started. The service assigned to this endpoint is as follows:

Registered service for sample Tracker Resubmit Endpoint

(1) Logs a message to underlying log engine
(2) Looks for the Tracker property keyed Resubmit Count.
(3-4) Checks and increments the property accordingly, to keep track how many times this was resubmitted
(5) Re-persist the property

Using this feature, developers can potentially re-execute customized logic based on the tracked content of the original Tracker document.

More examples

The distribution ships with an Integrate Package called examples, which contains services demonstrating more use cases.


  1. Only for document states that match the endpoint's configured document state and type.