Troubleshooting
Problem
API call not updating database with seconds precision ---> DataType = "TimeStamp"
Symptom
PART: Distributed Order Management 5.0 SP1 Platform
I am seeing an
unexpected truncation of data in an extended database field after calling
changeOrder() API.
My inputXML is:
<Order Action="MODIFY"
OrderHeaderKey="2003021015433232308498"><Extn<br>PackAndHoldProcessedDate="20030
530T16:14:04"/></Order>
Note: the PackAndHoldProcessedDate precision is down
to seconds.
After I call the changeOrder() api, the database displays and
contains = "5/30/2003" without time precision.
I expect the database to
display and contain ="5/30/2003 4:14:04 PM"
In the extensions.xml file
we have defined under the order header tag:
<Attribute
ColumnName="EXTN_PACK_HOLD_PROCESSED_DATE" DecimalDigits=""
DefaultValue="sysdate" Name="PackAndHoldProcessedDate" Nullable="FALSE"
Size="1" Type="DATE" XMLGroup="Extn" XMLName="PackAndHoldProcessedDate"/>
In the ssidatatypemap.xml and yfsdatatypemap.xml we have appended two
atttributes:
<Attribute Name="PackAndHoldProcessedDate" DataType="Date"
/>
<Attribute Name="xml:/Order/Extn/@PackAndHoldProcessedDate"
DataType="Date"/>
Why is the database representing truncated date values
even after I called changeOrder() with seconds precision as input?
Cause
Resolving The Problem
To have the time appear for the field, change the DataType="TimeStamp" for the
extended field.
After making this change you will need to restart
weblogic and recreate and deploy the ear file.
In the yfsdatatypemap.xml
we have appended two atttributes:
<Attribute Name="PackAndHoldProcessedDate"
DataType="TimeStamp" />
<Attribute
Name="xml:/Order/Extn/@PackAndHoldProcessedDate"
DataType="TimeStamp"/>
Also change the extensions.xml file by adding
DataType="TimeStamp" to the PACK_HOLD section.
Recreate the yfsdbextn.jar
file and restart weblogic.
<Attribute
ColumnName="EXTN_PACK_HOLD_PROCESSED_DATE" DataType="TimeStamp"
DecimalDigits="" DefaultValue="sysdate" Name="PackAndHoldProcessedDate"
Nullable="FALSE" Size="1" Type="DATE" XMLGroup="Extn"
XMLName="PackAndHoldProcessedDate"/>
In the Development Guide for
Yantra 5.0 SP1 in section 7.1 in table 7.1, the Type and Type ="TimeStamp" is
not outlined. TimeStamp is used to for capturing the date and timestamp of a
field (eg. 5/30/2003 12:34:23 PM). Type = "Date" just has the date (eg.
5/30/2003).
TimeStamp is also a valid DataType for the extensions.xml
and yfsdatatypemap.xml files.
Historical Number
PRI49107
Product Synonym
[<p><b>]Fact[</b><p>];
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21546804