November 2007
Monthly Archive
Thu 29 Nov 2007
Posted by Frank Kim under
PersonalizationNo Comments
Though I have a distaste for scenarios on occasion there will be a time when I want to create a new scenario. On such an occasion I still start up the ACC, go to Scenarios > Scenarios and discover I can’t create a scenario because the New Scenario box is grayed out.
The issue is often because the process editor server is configured incorrectly. ATG documents how to configure the process editor server.
For example today I found I could not create a new scenario. After putting this scenarioManager.xml in localconfig/atg/scenario and then restarting ATG I was able to create new scenarios again.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<process-manager-configuration>
<process-editor-server>
<server-name xml-combine="replace">
CRAPBOOK-PRO:8850
</server-name>
</process-editor-server>
</process-manager-configuration>
Note that the server name must be the same as the one found at /atg/dynamo/service/ServerName.serverName. For more information about the atg.service.ServerName class, see Referring to Dynamo Servers in the Nucleus: Using Nucleus section of the ATG Programming Guide.
Thu 29 Nov 2007
Posted by Frank Kim under
MiscellaneousNo Comments
Every once in awhile I’d find after leaving my Thinkpad for awhile that I’d find the screen blank. No matter what I did I could not get it to come back.
I finally figured out a workaround. By pressing Fn + Spacebar I decreased the screen resolution and the screen was displayed again. I then pressed Fn + Spacebar again to get back to my original display and then had to move back windows to where they were and resize some.
After doing this too many times I finally did a Google search to find out what was wrong. Fortunately this turned out to be a common problem, both on Windows and Linux.
Using the Windows Device Manager I saw that the driver for my ThinkPad PM (Power Management) Device was version 1.33.0.0. According to this page the latest driver is 1.43.0.0.
I updated this driver using ThinkVantage’s System Update utility (under Start Menu > ThinkVantage). I actually had to run the Software Installer which, because it was out of date, uninstalled itself and updated the System Update. Then when I ran the System Update it pulled down the driver update as part of its recommended updates.
So far the update seems to be working.
12/03/2007 - Turns out the update did not fix this problem. I then ran System Update and updated all critical and recommended updates. I am not sure if this solved the problem but I did notice my display now sometimes flickers. 
Sat 17 Nov 2007
Posted by Frank Kim under
Repository1 Comment
Today I noticed that my timestamp property was being saved with only the date information, not the time information. That is when I queried the corresponding column I saw something like this.
> select TO_CHAR(timestamp, 'yyyy-mm-dd hh24:mi:ss') from foo;
2007-11-17 00:00:00
The timestamp property was represented in Java using a Date class. I thought of switching it to a Timestamp class but was dubious because the only real difference is that the Timestamp class stores fractional seconds.
Then I looked at /atg/commerce/order/orderrepository.xml and the corresponding OrderImpl.java and realized that it used the timestamp repository data type while I was using the date repository date type. Since the Oracle column data type was also timestamp I found when I switched the repository data type the time information was also saved.
> select TO_CHAR(timestamp, 'yyyy-mm-dd hh24:mi:ss') from foo;
2007-11-17 20:03:00
The moral of the story is to use the timestamp repository data type, not the date repository data type.
ATG has more documentation about this though it is not entirely true, i.e. you can use the Date Java class type with the timestamp SQL type.
Thu 15 Nov 2007
Posted by Frank Kim under
MiscellaneousNo Comments
| Card Type |
Number |
| Master Card (16 Digits) |
5105105105105100 |
| Master Card (16 Digits) |
5555555555554444 |
| Visa (13 Digits) |
4222222222222 |
| Visa (16 Digits) |
4111111111111111 |
| Visa (16 Digits) |
4012888888881881 |
| American Express (15 Digits) |
378282246310005 |
| American Express (15 Digits) |
371449635398431 |
| Amex Corporate (15 Digits) |
378734493671000 |
| Dinners Club (14 Digits) |
38520000023237 |
| Dinners Club (14 Digits) |
30569309025904 |
| Discover (16 Digits) |
6011111111111117 |
| Discover (16 Digits) |
6011000990139424 |
| JCB (16 Digits) |
3530111333300000 |
| JCB (16 Digits) |
3566002020360505 |
If you want more test credit card numbers try Google.
Thu 15 Nov 2007
Posted by Frank Kim under
CommerceNo Comments
The CommerceItem has two properties, catalogRefId and catalogId.
I always forget which one is which so I am writing this post so I can remember. I guess it was because some companies have different conventions about SKU’s and products.
| ATG |
Real World |
| catalogRefId |
SKU ID |
| catalogId |
Product ID |
Maybe one day someone will explain the reason for the naming.