Tuesday, January 22, 2008

BI Publisher: XDO Loader

How many times has a developer approached you and said, "I made the changes to my template and put it out on the code tree, but my change isn't being recogonized in 11i." Your response could be two things.

1. You need to upload it into the database using the XML Publisher Administrator responsiblity.
2. Use xdo loader, an example is on ike's blog...

Number 2, is really the best option (he he )....if the template config is already done. When you start browsing and uploading files from your PC or emailing them to your administrator, your opening the door for mistakes, mistakes suck when they happen in production. One of the biggest advantages of using XDO loader is the fact that what's out on the code tree is what will get loaded into the database. The only other workaround for loading templates from unix is samba...

Implementing a solution using XDO Loader in your shop is really easy task. These sample calls are designed to be called from a shell script. They are for existing templates that have been configured in 11i. Essentially, calling this script will automatically, convert your RTF to XSL-FO and upload it in the database.

Static Example:

/opt/java1.5/bin/java oracle.apps.xdo.oa.util.XDOLoader \
UPLOAD \
-DB_USERNAME apps \
-DB_PASSWORD apps \
-JDBC_CONNECTION sand:1535:NADV \
-LOB_TYPE TEMPLATE_SOURCE \
-APPS_SHORT_NAME VCA \
-LOB_CODE VGMDQCARD \
-LANGUAGE en \
-TERRITORY US \
-XDO_FILE_TYPE RTF \
-FILE_CONTENT_TYPE 'application/rtf' \
-FILE_NAME $VCA_TOP/xml_pub/template/VGMDQCARD.rtf \
-NLS_LANG $NLS_LANG \
-CUSTOM_MODE FORCE \

Dynamic Example:
/opt/java1.5/bin/java oracle.apps.xdo.oa.util.XDOLoader \
UPLOAD \
-DB_USERNAME apps \
-DB_PASSWORD apps \
-JDBC_CONNECTION $1 \
-LOB_TYPE TEMPLATE_SOURCE \
-APPS_SHORT_NAME VCA \
-LOB_CODE $2 \ -LANGUAGE en \
-TERRITORY US \
-XDO_FILE_TYPE RTF \
-FILE_CONTENT_TYPE 'application/rtf' \
-FILE_NAME $VCA_TOP/xml_pub/template/$3 \
-NLS_LANG $NLS_LANG \
-CUSTOM_MODE FORCE

$1 = JDBC Connection string this could be simplified by setting up an environment variable.
$2 = this is the name of the template code (select LOB_CODE from xdo_lobs)
$3 = this is the RTF flatfile

-CUSTOM_MODE FORCE = FORCE the update if a lob already exists, otherwise it will error out....

Tuesday, January 8, 2008

BI Publisher: Blog Tag

Tim Dexter has decided to blog tag me. Being a good sport I will accept his challenge. Basically, I have to reveal 8 things that people wouldn’t know about me unless I told you.


1. Being 50% Irish, 25% German, 15%, Scottish, 5% English. I have a fond love for beer, it’s genetic :-). I have brewing beer successfully at home for over 2 years and yes it’s very drinkable I might add. It’s because of this I would consider myself a “beer snob.” If you know who Michael Jackson is, then you’re probably a beer snob too and I’m not talking about the singer….

2. I lack any form of shame. Two small examples: There is a childhood picture of me in my senior yearbook riding a horse naked or the fact that in my previous driver license photo I don’t have my shirt on.

3. I’m notoriously cheap. If you ask my wife she’ll say this is a typical conversation: Does it cost money? Then it’s been decided were not doing it.

4. I still use my college student ID to get discounts at movie theaters. I’m 28 years old….On a side-note, I convinced my wife to do the same thing :-)

5. A typical vacation for me is usually a tropical destination. I love to dive. Diving is one of the most relaxing sports around. I’m jaded though because it’s quite an expensive hobby (see #3).

6. I recently got into Olympic lifting, it’s awesome sport.

7. PBS Junky

8. I believe global warming is a real phenomenon...