DECEDI_TRACK(3) — Subroutines
Name
DECEDI_TRACK − This enables the caller to track objects within the DEC/EDI Server. It can provide lists of objects that match certain selection criteria, and it can return different types of information for the objects that meet the selection criteria, for example routing information or object status.
The Track command can track only one kind of object at a time. The type of object being tracked must be specified and may be one of the following:
•Application_file -- files that have been posted or fetched via the Mapper on the Server. These files are also known as Structured files.
•Transmission_file -- files that have been sent or received via the Communications Service on the Server, or are waiting to be sent via the Communications Service. These files are also known as Unstructured files.
•Document -- files that have gone through or are waiting to go through the Translation Service on the Server. This also includes documents that are involved in Application-to-application agreements. These files are also known as ’ihf’ files.
C Binding
#include <decedi_api_def.h>
unsigned long int DECEDI_TRACK (application,
filters,
match_count,
selections,
results)
char ∗application;
decedi_t_item_list filters;
unsigned long int ∗match_count;
decedi_t_item_list selections;
decedi_t_track_list ∗results;
Arguments
application
The name of the client application submitting the request to the Server. This is a null-terminated character string. This argument is used by DEC/EDI as a means of authenticating the request; the client application must be registered as an authorized application on the Server. Applications are registered by using the CommandCenter Management Services editor. For more information, refer to DEC/EDI Configuring.
filters
An item list specifying the selection criteria for the objects that are to be tracked. Build up the item list using one or more calls to DECEDI_ADD_ITEM_LIST. The valid item identifier values allowed in the item list for this request are given in Table 1. If no filters are specified then all objects are selected.
Table 1: DECEDI_TRACK Object Selection Criteria
| Value | Description |
| ----- | ----------- |
| DECEDI_ITM_APPLICATION_NAME | Select objects by the sending or receiving application. The value associated with this is a string. |
| DECEDI_ITM_BEFORE | Select objects that entered the DEC/EDI system before the specified time. The value associated with this is a string of the format DD-MMM-YYYY HH:MM:SS.CC. If you do not supply a value for day, month or year, the current value will be used as the default. |
| DECEDI_ITM_BUSINESS_REFERENCES | Select objects by the business references that have been applied to them. This is a string value containing up to 5 values, each separated by a comma. Empty values are allowed so that each of the 5 available business reference slots can be tested for matches against specific values. To search irrespective of slot position, use DECEDI_ITM_SINGLE_BUSINESS_REFERENCE. |
| DECEDI_ITM_CURRENT_STATUS | Select objects by object status. The value associated with this will be an unsigned integer that can have any of the values specified in Table 2. |
| DECEDI_ITM_DATABASE | Select objects from either the Live database, Archive database or both. The value associated with this will be an unsigned integer that can have one of the values specified in Table 4. |
| DECEDI_ITM_DIRECTION | Select objects by direction; that is, whether they are being sent or received. The value associated with this will be an unsigned integer which can have one of the valid values specified in Table 3. |
| DECEDI_ITM_DOCUMENT_NAME | Select objects by external document type. The value associated with this is a string (for example, "INVOIC" or "810"). |
| DECEDI_ITM_FILE_TYPE | Select objects by file type. The valid values for this flag are given in Table 7. If not specified then DECEDI_FILE_TYPE_APPLICATION_FILE is assumed. |
| DECEDI_ITM_LINK_ID | Select objects by connection ID, if bypassing the mapper and Translation Service. The value associated with this is a character string. |
| DECEDI_ITM_MPR_RUN_ID | Select document objects by mapper run id. The value associated with this is a string. |
| DECEDI_ITM_OBJECT_NAME | Select objects by object type. The value associated with this is a string. |
| DECEDI_ITM_PARTNER_NAME | Select objects by the sending or receiving partner. The value associated with this is a string. |
| DECEDI_ITM_SINCE | Select objects that entered the DEC/EDI system after the specified time. The value associated with this is a string of the format DD-MMM-YYYY HH:MM:SS.CC. If you do not supply a value for day, month or year, the current value will be used as the default. |
| DECEDI_ITM_SINGLE_BUSINESS_REFERENCE | Select objects by the business references that have been applied to them. This searches each of the business reference slots for a match. To search specific slot positions, use DECEDI_ITM_BUSINESS_REFERENCES. |
| DECEDI_ITM_STANDARD | Select object by the standard used to process it. The value associated with this will be an unsigned integer that can have one of the values specified in Table 5. |
| DECEDI_ITM_TEST_INDICATOR | Select object by its test indicator. The value associated with this will be an unsigned integer that can have one of the values specified in table 6. |
| DECEDI_ITM_TRACKING_REFERENCE | Select objects by tracking reference. The value associated with this is a string. |
| DECEDI_ITM_VERSION | Select object by the version of the standard used to process it. The value associated with this is a string (for example, "003002" or "901"). |
Table 2: DECEDI_TRACK Object Status Values
| Value | Description |
| ----- | ----------- |
| DECEDI_AVAILABLE | The object is available for fetching by an application. |
| DECEDI_COMPLETED | The object has completed processing within the Server. Either it has successfully reached completion or has been canceled. |
| DECEDI_FAILED | The object failed to be processed through the Server. |
| DECEDI_IN_PROGRESS | The object is currently being processed through the Server. |
Table 3: DECEDI_TRACK Object Direction Values
| Value | Description |
| ----- | ----------- |
| DECEDI_INBOUND | The object is being received by the Server. |
| DECEDI_OUTBOUND | The object is being sent by the Server. |
Table 4: DECEDI_TRACK Object Database Values
| Value | Description |
| ----- | ----------- |
| LIVE (D) | Select objects from the Live server audit database. This is the default. |
| ARCHIVE | Select objects from the archived audit database. By definition these will be of status purgeable or cancelled. |
| BOTH | Select objects from both the Live and Archive databases. |
Table 5: DECEDI_TRACK Object Standard Values
| Value | |
| ----- | |
| EDIFACT | |
| X12 | |
| TDCC | |
| ODETTE | |
| TRADACOMS |
Table 6: DECEDI_TRACK Object Test Indicator
| Value | Description |
| ----- | ----------- |
| LIVE | Live files. This is the default. |
| MAPPER_TEST | Files tested through to the Mapping Service. |
| TRANSLATION_TEST | Files tested through to the Translation Service. |
| PARTNER_TEST | Files tested through all services to the trading partner. |
Table 7: Values for File Type
| Value | Description |
| ----- | ----------- |
| DECEDI_FILE_TYPE_DOCUMENT | Document files which have been, or are due to go through the Translation Service or are involved in These files are also known as In-house files (DECEDI_FILE_TYPE_IHF). |
| DECEDI_FILE_TYPE_APPLICATION_FILE | Application file documents that have been through the mapper. These files are also known as Structured files (DECEDI_FILE_TYPE_STRUCTURED). |
| DECEDI_FILE_TYPE_TRANSMISSION_FILE | Unstructured transmission files which have been though, or are due to go through the Communications Service. These files are also known as Unstructured files (DECEDI_FILE_TYPE_UNSTRUCTURED). |
match count
This parameter returns the number of matches found.
selections
An item list specifying the type of data to return to the caller. The item identifier values allowed in the item list for this request are given in Table 8. If not specified then only the number of objects in the system is returned.
No value is associated with any of the identifiers in Table 8.
Table 8: Selection Identifiers
| Value | Description |
| ----- | ----------- |
| DECEDI_SEL_ACKNOWLEDGEMENT | Provide functional acknowledgement information when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_DOCUMENT. |
| DECEDI_SEL_BUSINESS_REFERENCES | Provide all business references associated with the object when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_DOCUMENT. |
| DECEDI_SEL_COMMS_DATA | Provide full communications audit record information when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_TRANSMISSION_FILE. |
| DECEDI_SEL_DOCUMENT | Provide document level information when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_DOCUMENT. |
| DECEDI_SEL_EDI_CONTROL_REFS | Provide all EDI envelope control references associated with the object. |
| DECEDI_SEL_FUNCTIONAL_GROUP | Provide functional group information when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_DOCUMENT. |
| DECEDI_SEL_HISTORY | Provide full history information (status transitions) when DECEDI_ITM_FILE_TYPE is DECEDI FILE_TYPE_TRANSMISSION_FILE, or DECEDI_FILE_TYPE_DOCUMENT. |
| DECEDI_SEL_INTERCHANGE | Provide interchange level information when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_DOCUMENT. |
| DECEDI_SEL_MAPPER | Provide all data associated with the mapper when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_DOCUMENT. |
| DECEDI_SEL_ROUTING | Provide all data associated with the routing of this object through the DEC/EDI system such as application name, partner name, document type. |
| DECEDI_SEL_STATUS | Provide status information associated with the object. |
| DECEDI_SEL_TRACKING_REFS | Provide all tracking references associated with the object. |
| DECEDI_SEL_OTHER_DATA | Provide X12 application file information, size information, file location, priority, test indication and batch file information when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_DOCUMENT. Also when DECEDI_ITM_FILE_TYPE is DECEDI_FILE_TYPE_TRANSMISSION_FILE, provide size, priority and file location information. |
| DECEDI_SEL_ALL | Select all of the above information. |
results
A dynamic list structure that is returned on completion with the object data requested. Deallocate the list’s memory using DECEDI_FREE_TRACK_LIST.
Description
This routine issues a request to the Server to fetch details of one or more objects in the DEC/EDI system. It returns data for only those objects that match the selection criteria.
Build this request using one or more calls to DECEDI_ADD_ITEM_LIST. Once this call has been completed, you can release the associated item lists using DECEDI_FREE_ITEM_LIST.
The results, if any have been requested, are placed in a dynamically allocated list. Once all the results have been processed, free this list using DECEDI_FREE_TRACK_LIST.
Return Values
DECEDI_BADITMLST
The request was rejected as the call had invalid, or missing item lists.
DECEDI_BADPARAM
The request was rejected as the call had invalid, or missing parameters.
DECEDI_INSUFVMInsufficient virtual memory available to complete request.
DECEDI_INTERROR
Internal error.
DECEDI_NOCLIENTLIC
No active client license was found.
DECEDI_ORBBADNODE
Bad server selection node.
DECEDI_ORBBUSYObjectBroker busy.
DECEDI_ORBCOMMFAIL
Communications to server failed.
DECEDI_ORBDOWN
ObjectBroker not running.
DECEDI_ORBERROR
ObjectBroker failure.
DECEDI_ORBSAKERR
ObjectBroker "SAK" error.
DECEDI_ORBSRVDIED
Server process died.
DECEDI_ORBSRVNOTFND
No server found.
DECEDI_ORBTIMEOUT
Server timeout.
DECEDI_ORBVERMISM
ObjectBroker version mismatch.
DECEDI_SUCCESSThe request was successfully processed by the server.
Example
#include <decedi_api_def.h>
unsigned long int status;
decedi_t_item_list filters = (decedi_t_item_list) NULL;
decedi_t_item_list selections = (decedi_t_item_list) NULL;
decedi_t_track_list ∗results;
decedi_t_ulong status_value = DECEDI_AVAILABLE;
decedi_t_ulong ∗match_count
status = DECEDI_ADD_ITEM_LIST (&filters,
(unsigned long int) DECEDI_ITM_APPLICATION_NAME,
(unsigned long int) DECEDI_STRING,
(unsigned long int) strlen("MY-APPLICATION"),
(char ∗) "MY-APPLICATION",
(unsigned long int DECEDI_READ_ONLY);
if (status != DECEDI_SUCCESS)
{
}
status = DECEDI_ADD_ITEM_LIST (&filters,
(unsigned long int) DECEDI_ITM_CURRENT_STATUS,
(unsigned long int) DECEDI_UINTEGER,
(unsigned long int) sizeof(status_value),
(char ∗) &status_value,
(unsigned long int DECEDI_READ_ONLY);
if (status != DECEDI_SUCCESS)
{
}
status = DECEDI_ADD_ITEM_LIST (&selections,
(unsigned long int) DECEDI_SEL_TRACKING_REFERENCE,
(unsigned long int) DECEDI_UINTEGER,
(unsigned long int DECEDI_READ_ONLY,
(char ∗) NULL,
(unsigned long int DECEDI_READ_ONLY);
if (status != DECEDI_SUCCESS)
{
}
status = DECEDI_TRACK ( "MY-APPLICATION", /∗ Application name ∗/
filters, /∗ Filters ∗/
&match_count, /∗ Number of matches found ∗/
selections, /∗ Data required ∗/
&results /∗ Returned results ∗/
);
status = DECEDI_FREE_ITEM_LIST (&selections);
status = DECEDI_FREE_ITEM_LIST (&filters);
status = DECEDI_FREE_TRACK_LIST (&results);