A new fulfiller must be configured within Nucleus before it can be used by the fulfillment system. This section uses the example of configuring CustomFulfiller , the fulfiller created in the Creating a New Fulfiller section.
Use the ATG Control Center to edit the Configuration component located in atg/commerce/fulfillment/.
Change the property fulfillerPortNameMap to include the name of this new fulfiller.
Configure the port on which messages will be sent to this fulfiller. This is the port on which the OrderFulfiller component will send JMS messages for this fulfiller.
For example, add the following to Configuration.properties:
fulfillerPortNameMap+=\
CustomFulfiller = CustomFulFillerPort
You will also need to define which types of shipping groups can be handled by your fulfiller.OrderFulfiller uses this information to verify that a shipping group can be fulfilled by its fulfiller.
For example, add the following to Configuration.properties:
fulfillerShippingGroupMap+=\
CustomFulfiller =mypackage.MyShippingGroup
In this example, the fulfiller being added is called CustomFulfiller The component using an instance of HardgoodFulfiller should make the name property of the HardgoodFulfiller “CustomFulfiller ”
For example, add the following to CustomFulfiller .properties:
fulfillerName=CustomFulfiller
In addition, add the following properties to CustomFulfiller .properties:
orderManager^=Configuration.orderManager
orderFulfillmentTools^=Configuration.orderFulfillmentTools
messageSourceName=CustomFulfiller
modifyNotificationPort=ModifyNotificationPort
shippingGroupStates=/atg/commerce/states/ShippingGroupStates
shipItemRelationshipStates=
/atg/commerce/states/ShipItemRelationshipStates
Configure the CustomFulFillerPort in the dynamoMessagingSystem.xml file so that the OrderFulfiller component can send out the FulfillOrderFragment messages on this port.
For example, add the following dynamoMessagingSystem.xml for OrderFulfiller:
<message-filter>
<nucleus-name>
/atg/commerce/fulfillment/OrderFulfiller
</nucleus-name>
. . .
<output-port>
<port-name>
CustomFulFillerPort
</port-name>
<output-destination>
<provider-name>
sqldms
</provider-name>
<destination-name>
sqldms:/Fulfillment/MyOwnGoods
</destination-name>
<destination-type>
Topic
</destination-type>
</output-destination>
</output-port>
. . .
</message-filter>
Configure the CustomFulfiller component to send messages on the modifyNotificationPort and listen for messages on the sqldms:/Fulfillment/MyOwnGoods topic. These topics are described above.
<message-filter>
<nucleus-name>
/myPackage/CustomFulfiller
</nucleus-name>
<output-port>
<port-name>
ModifyNotificationPort
</port-name>
<output-destination>
<provider-name>
sqldms
</provider-name>
<destination-name>
sqldms:/Fulfillment/ModifyOrderNotification
</destination-name>
<destination-type>
Topic
</destination-type>
</output-destination>
</output-port>
</message-filter>
<message-sink>
<nucleus-name>
/myPackage/CustomFulfiller
</nucleus-name>
<input-port>
<port-name>
DEFAULT
</port-name>
<input-destination>
<provider-name>
sqldms
</provider-name>
<destination-name>
sqldms:/Fulfillment/MyOwnGoods
</destination-name>
<destination-type>
Topic
</destination-type>
</input-destination>
</input-port>
</message-sink>
For more information, see the Dynamo Message System chapter of the ATG Programming Guide.
Set the MessageSourceName property of the CustomFulfiller to “MyOrderFulfiller” or another value that indicates who sent a message. This allows the component to ignore messages that it sent itself.
Add another value to the fulfiller property of the SKU in the product catalog.
(Defined in /atg/commerce/catalog/productCatalog.xml)
This should match the name of the fulfiller used to map to a port in OrderFulfillmentTools.fulfillerPortNameMap.
<item-descriptor name="sku" display-name="SKU"
sub-type-property="type"
display-property="displayName"
. . .
<property name="fulfiller" data-type="enumerated"
column-name="fulfiller" queryable="false">
<attribute name="useCodeForValue" value="false"/>
<option value="HardgoodFulfiller" code="0"/>
<option value="SoftgoodFulfiller" code="1"/>
<option value="CustomFulfiller" code="2"/>
</property>
. . .
</item-descriptor>
The modificationHandler property can be modified to point to another component that extends atg.commerce.fulfillment.ModificationHandler to handle with different forms of modifications received by the fulfiller. The ModificationHandler class provides a simple framework for changing the handling of ModifyOrder and ModifyOrderNotifications. It is not necessary to use a separate ModificationHandler. In the example above, handleModifyOrderNotification was implemented directly within the fulfiller class CustomFulfiller
------------------------------------------------------------------------------------------------------------.