Documente Academic
Documente Profesional
Documente Cultură
ii
Contents
CONTENTS................................................................................................ III
SEND US YOUR COMMENTS ......................................................................... V
PREFACE ................................................................................................. 1-1
CHANGE HISTORY .................................................................................................. 1-1
iii
If you find any errors or have any other suggestions for improvement, please indicate the title and
part number of the documentation and the chapter, section, and page number (if available). You can
send comments to us in the following ways:
Postal service:
Manager OTM Curriculum & Documentation
Oracle Corporation
1016 W. Ninth Ave.
Suite 300
King of Prussia, PA 19406
USA
If you would like a reply, please give your name, address, telephone number, and electronic mail
address (optional).
If you have problems with the software, contact Support at https://support.oracle.com or find the
Support phone number for your region at http://www.oracle.com/support/contact.html.
Preface
The intent of this document is to provide documentation for the Java APIs that have been exposed for
customers or third parties to extend existing Oracle Transportation Management functionality. These
external APIs are stand alone objects with a Java interface provided by Oracle Transportation
Management to minimize the programming effort and maximize runtime performance.
Change History
Date
Document Revision
Summary of Changes
12/15/09
-01
Initial release.
Added Location Validation
1-1
Set Up
The first step is to ensure there is a valid External Distance Engine (EDE) defined in Oracle
Transportation Management that has the path to a custom Java class defined. This is the main link
between Oracle Transportation Management and a custom EDE. If the path is incorrect or points to a
java class that does not implement ExternalDistanceEngineInterface any lookup using the EDE will
fail. Parameters that are required for the specific EDE can be entered in the parameters table on the
EDE itself and are mapped via the parms variable in the interface.
The structure for this External Distance Engine will be:
Value
User Defined
Java Class
Ex:
glog.externalapi.distanceengine.MyExternalEngine
CACHE_OFF = N
Defines whether
the lookup return
value will be
cached and how.
There are more
detailed
descriptions in
Oracle
Transportation
Management help.
CACHE_BY_XLANE_LOOKUP_SAVE = Y
CACHE_BY_XLANE_LOOKUP_NO_SAVE = L
CACHE_BY_XLANE_NO_LOOKUP_SAVE = C
CACHE_BY_ADDRESSES_LOOKUP_SAVE = A
County Override ID
User Defined
Comments
If a county needs
to be translated
before its passed
to the Distance
Engine, it will have
to be mapped in
the County
Override Table.
1-1
Value
Country Code
Comments
User Defined
User Defined
User Defined
SourceAddr is type ExtEngineAddress that contains all the location information for the start
address.
DestAddr is type ExtEngineAddress that contains all the location information for the
destination address.
AuxInput is another class that can contain SCAC and Route Codes off the location. This is
usually only necessary for Rail lookups and is avaliable as read-only.
Parms is a mapping to all the input parameters that were entered in Oracle Transportation
Management for the specific EDE.
Outputs:
Exception Handling:
ExtEngineException.java is explained in the JavaDoc.
Its default constructor is in the format ExtEngineException(Throwable t, String s) and can also
handle a single argument of type String or Throwable.
Standard Output:
Return ExtEngineDistance(25.4 MI);
Or, optional:
Return ExtEngineDistance(MI, 25.4);
Unit of measure is user defined and no conversions will take place
from Oracle Transportation Management and pass the result back to Oracle Transportation
Management.
Set Up
The first step is to ensure a valid EDE is defined. The setup for the validation is the same as the Java
interface for external distance calculation described above. The only difference is that location
validation does not cache any results so the EDE cache setting will be ignored.
SourceAddr is type ExtEngineAddress that contains all the location information for the location
to be validated.
AuxInput is another class that can contain other data and is available as read-only.
Parms is a mapping to all the input parameters that were entered in Oracle Transportation
Management for the specific EDE.
Outputs
Exception Handling
ExtEngineException.java is explained in the JavaDoc.
Its default constructor is in the format ExtEngineException(Throwable t, String s) and can also
handle a single argument of type String or Throwable.
Standard Output:
Return LocationAddressMatches();
LocationAddressMatches is the return type for the validateAddress method in the interface. Details of
this class are provided in the javadoc. For engines that support multiple suggested locations,
LocationAddressMatches does have a List object that takes type ExtEngineAddress and can contain the
returned locations data.
1-3
Set Up
The first step is to ensure there is a valid External Rating Engine (ERE) Fieldset defined in Oracle
Transportation Management that has the path to a custom Java class defined. This is the main link
between Oracle Transportation Management and a custom ERE. If the path is incorrect or points to a
java class that does not implement glog.externalapi.rateengine.REXPublicExternalInterface, any
lookup using the ERE will fail.
Value
Comments
Fieldset ID
USER_DEFINED
USER_DEFINED
glog.externalapi.rateengine.CLASS_NAME
The External Rating Engine Fieldset also specifies the information that will be passed from Oracle
Transportation Management into the invocation of the external engine by defining a list of one or more
Rate Basis Items (RBIs). Using the lower half of the Fieldset Power Data UI screen, a user can select
a set of RBIs and include them in the fieldset by clicking on one of the right-pointing arrows. These
RBI references (listed below under the GID column) are stored in the
external_rating_engine_fieldset_d table.
Copyright 2009, Oracle and/or its affiliates. All rights reserved.
2-1
RBI
GID
SHIPMENT.NUMLINES
SHIPMENT.SOURCE.POSTAL_CODE
SHIPMENT.DEST.POSTAL_CODE
SHIPMENT.RATE.SERVPROV
SHIPMENT.RATE.RATE_SERVICE
SHIPMENT.LINES.WEIGHT
There are two ways to invoke an external rating engine using Oracle Transportation Management:
Value
Comments
GENERIC
USER_DEFINED
2-2
Value
Comments
Field
Value
Comments
Cost Type
External
GENERIC
USER_DEFINED
The external rating engine can fill in the estimated pickup and delivery times. The RATE
SERVICE object associated with the rate must have a service type of TIMEDEFINITESERVICE
The external rating engine can fill the serviceDays field. The RATE SERVICE object associated
with the rate must have a service type of EXTERNAL SERVICE DAYS.
If the rate service doesnt have the above service types, then the service time data returned from the
rating engine will be ignored and an exception will be thrown, flagging the rate as infeasible.
For this type of rate service, location calendar, location capacity and carrier capacity are not
considered. Pickup or delivery activity time at a stop is always 0.
The following assumptions also hold true:
It does not make sense to have HOLD AS LATE AS POSSIBLE set to TRUE
regardless of the setting of the planning parameter HOLD AS LATE AS POSSIBLE, this type of
rate service is always calculated in HOLD AS LATE AS POSSIBLE = false.
Orders pickup and delivery windows should be a whole day. If the orders have a narrow
pickup and delivery window, the specific pickup time and delivery time will fall out of the
orders windows, so it will fail to use this rate. For example, the orders delivery window is
10:00-11:00am, but rate engine come back with a delivery time of 4:00PM, then rate service
will fail this rate.
It only applies to single leg shipments: i.e., shipment with rate service type cannot have
upstream and downstream shipment.
2-3
There is one input parameter. A type, Map, that uses a String Argument for the key and a list of
Strings for the values. It will be similar to this:
{SHIPMENT.NUMLINES,3},
{SHIPMENT.SOURCE.POSTAL_CODE,19406},
{SHIPMENT.DEST.POSTAL_CODE,34639},
{SHIPMENT.RATE.SERVPROV,UPS },
{SHIPMENT.RATE.RATE_SERVICE,UPS GROUND},
{SHIPMENT.RATE.SERVPROV_ACCOUNT_NUMBER, 12345634},
{SHIPMENT.LINES.WEIGHT,{10 LB,15 LB,10 LB}}*
Outputs:
glog.externalapi.ratengine.REXRateResult has the following public member variables and is
explained in more detail in the JavaDoc:
REXRateResult:
String err: If this is set, this shows an error in the log but will not throw an exception
Collection<CostDetail> details
Integer serviceDays: If the ERE returns the number of service days, this can be set here.
Otherwise a value of NULL equals no data.
String chargeableWeightUom: Unit of Measure for the chargeable weight (ex. LB, KG, etc.)
Double dimWeight: Dimensional weight. Copied to the Shipments dimensional weight field.
Only used when invocation of ERE is specified on the Rate Offering
Collection<CostDetail> details: Details about each individual cost calculated by the external
rating engine
REXRateResult.CostDetail:
2-4
String accessorialCode: If this cost is an accessorial, the accessorial code is specified here.
This code must exist in Oracle Transportation Management.
String costCode: Secondary accessorial code for classification purposes only. This code must
exist in Oracle Transportation Management.
String specialServiceCode: If this cost is a special service, the special service code is specified
here. This code must exist in Oracle Transportation Management.
Boolean isWeightedCostOnly: Some costs are calculated as weighting factors that do not affect
the actual final cost of a shipment. Set this field to true if this is a weighted cost.
Collection<String> calculationDetails: A list of simple text strings that the ERE implementor
can use to give detailed information on how a cost was calculated.
Once the input is defined and an actual lookup is complete, the cost Shipment method needs to return
the REXRateResult object.
2-5
3. Directory Information
Jar file with custom java classes should be placed in <otm install dir>/glog/gc3webapp/WEBINF/lib/external/. Oracle Transportation Management includes jar files in this directory on the
classpath.
3-1
3-2