betweenGo

Tag: xml

Adding a New Link to a Commerce Pipeline

by on Jun.22, 2011, under Commerce

Only as strong as the weakest link. Part 2 | Flickr

Only as strong as the weakest link. Part 2 by David’n'Sheila

To add new links to a commerce pipeline you need to override the default definition for the appropriate commerce pipeline.  Commerce pipelines are defined in XML so you use ATG’s XML combining feature to accomplish this.

For example if you want to add a new link to the ProcessOrder chain in the /atg/commerce/commercepipeline.xml you would create the following commercepipeline.xml in your local config.

<pipelinemanager>
  <pipelinechain name="processOrder" xml-combine="append">
    <pipelinelink transaction="TX_MANDATORY" name="authorizePayment" xml-combine="replace">
      <processor jndi="/atg/commerce/order/processor/AuthorizePayment" />
      <transition returnvalue="1" link="updateInventory" />
    </pipelinelink>
    <pipelinelink name="updateInventory" transaction="TX_MANDATORY">
      <processor jndi="/betweengo/commerce/inventory/processor/ProcUpdateInventory" />
      <transition returnvalue="1" link="updateGiftRepository" />
    </pipelinelink>
</pipelinemanager>

In this example we added the new updateInventory link which is inserted between the authorizePayment and updateGiftRepository links.

Share
Leave a Comment :, more...

Tweets for 2010-01 and 2010-02

by on Feb.28, 2010, under Miscellaneous

Ruby on Rails

  • Numeric data types and zerofill. Explains what all those int(11) columns are in your Ruby on Rails tables. http://bit.ly/9Tcf7q #
  • undefined local variable or method "acts_as_list"? – Ruby Forum. Do ruby script/plugin install acts_as_list http://bit.ly/9kFWbG #
  • ruby on rails : adding child records to an existing parent without visiting the parent – Stack Overflow http://bit.ly/cQiGSP #
  • Multi-Table Inheritance in Rails – When two tables are one… This is not easy and I wish it was. http://bit.ly/9fbzgk #
  • has_many :through – count vs length vs size. Use count if u don’t want to load the contents of association into memory. http://bit.ly/dtqXe1 #
  • A gentle reminder about pluralizations. config/initializers/inflections.rb to customize pluralizations in Ruby on Rails http://bit.ly/bN9GO5 #
  • Ruby on Rails – Rails Migrations Cheatsheet – Dizzy. Pretty helpful. http://bit.ly/9wNvRx #
  • RailsGuides Migrations. Nice guide, especially about explaining the naming convention which I don’t like. http://bit.ly/cjZ7aB #

ATG

  • Configuring ATG to Send Email via Comcast SMTP – betweenGo. Configuring your ATG app to use your ISP’s SMTP server. http://bit.ly/7M5bhx #
  • Enabling non-XA Resources in JBoss 4.2 with ATG – betweenGo. http://bit.ly/aDN3Po #
  • Combining XML in ATG – betweenGo. Combining XML files not as straight-forward as w/ properties files but more flexible. http://bit.ly/8kVwvA Jan 12 12:00 PM

Eclipse

  • Debugging Applications in IBM Rational Application Developer. Page 12 for how to set up server for debugging. http://bit.ly/aaYUHb #

JavaScript

  • How can I submit a form along with some parameters using JavaScript? (JSF forum at JavaRanch). Answer #3 was helpful. http://bit.ly/b17ymm #

JSP

  • Testing Which Page Loaded your JSP Page Fragment – betweenGo. Simple enough to do w/ JSTL but I always forget how. :-) http://bit.ly/cEh7IZ #

Miscellaneous

  • Cygwin 1.7.x, mounts and /etc/fstab – betweenGo. Mounts are no longer saved from session to session in Cygwin 1.7. http://bit.ly/bmaYEu #
  • Git in 5 Minutes http://bit.ly/bSt3dd and Git for the lazy – Spheriki http://bit.ly/aefD17 #
  • The Thing About Git. Nice article describing how flexible Git is, especially compared to SVN. I may never use SVN again http://bit.ly/bD0tuS #
  • I use DreamHost and am shamelessly plugging them both for a referral and to try to win an iPad. Honestly they’re great. http://bit.ly/ctYv3Z #
Share
Leave a Comment :, , , , , , , , , , , , more...

Combining XML in ATG

by on Jan.12, 2010, under Programming

Legospective on Flickr

(Photo: Legospective by Guillermо)

ATG uses XML files sometimes instead of Java properties files for configuration.  Combining them is not as straight-forward as with Java properties files but more flexible.

The XML File Combination section in the Nucleus: Organizing JavaBean Components chapter of the ATG Programming guide gives a good explanation.  You can combine XML files using one of these methods.

  • replace
  • remove
  • append
  • append-without-matching
  • prepend
  • prepend-without-matching

In most cases you will append.  In one case I wanted to update the id-spaces for orders but I had to first remove before appending because replace did not work in this case.  This is how I did it.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<id-spaces>
  <id-space xml-combine="remove" name="order" seed="1" batch-size="10000" prefix="o"/>
  <id-space name="order" seed="100" batch-size="1" prefix="m"/>
</id-spaces>

To see the result of XML combining you can use the Dynamo Administration Server’s Component Browser to go to the component and then click on the property which specifies the XML file(s).

For example to find the result of combining idspaces.xml’s you would go to http://localhost:8080/dyn/admin/nucleus/atg/dynamo/service/IdGenerator/?propertyName=initialIdSpaces.

To find the result of combining productCatalogs.xml’s you would go to http://localhost:8080/dyn/admin/nucleus/atg/commerce/catalog/ProductCatalog/?propertyName=definitionFiles.

To find the result of combining commercepipeline.xml’s you would go to http://localhost:8080/dyn/admin/nucleus/atg/commerce/PipelineManager/?propertyName=definitionFile.

Share
Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!