Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
1 reply Latest Post - ‏2013-07-04T06:43:02Z by rich_g_aus
rich_g_aus
rich_g_aus
21 Posts
ACCEPTED ANSWER

Pinned topic Help on where to extend business logic for XSHIPINFO

‏2013-07-03T06:43:06Z |

Could someone please assist me understand where and how to extend the order logic to process a new field in the ShippingInfo?

This is the approach I've used:

Persistence Layer Extension:

Created a new XSHIPINFO table and relate by SHIPINFO_ID

Unpacked and modified the SHIPINFO bean mapping to include the additional fields into the existing ShipInfo bean.

Tested this bean and it seems fine, it retrieves and adds the data okay.

Business Logic Layer

This is where I"m encountering challenges. I have extended the OrderFacadeClient and the ExtendOrderItemProcessCmd. I'm expecting to use the Facade client to populate the extra parameter into the Userdata when it's present in the request, and the Process command extension will use my extended ShipInfo Bean to persist it.

However, the Extended version of the facade client is not being called when I call AjaxOrderChangeServiceShipInfoUpdate. but it is being called when I call AjaxOrderChangeServiceItemUpdate/Delete. 

Could someone help me understand why it would be executed for one call and not the other? I feel I'm missing a configuration, or perhaps another part of the facade is used when udpating shipInfo (I've extended buildOrderItem method).

Any help is appreciated....

 

  • rich_g_aus
    rich_g_aus
    21 Posts
    ACCEPTED ANSWER

    Re: Help on where to extend business logic for XSHIPINFO

    ‏2013-07-04T06:43:02Z  in response to rich_g_aus

    Here's an update on this - I've figured out that the extended client facade is being used, but the code path for building the order item is not used unless the order item array is passed with the call to the ShipInfoUpdate commands.

    There's what appears to be a bug that doesn't allow the order level ShipInfo to be modified before the change BOD is posted.

    So I've had to fall back to overriding the buildOrder and using the base Order's UserData to store the field rather than the extended ShipInfo section. It's not a show-stopper, but a little annoying. the bug appears to be caused by this method declaration:

    private RespondOrderDataAreaType updateSingleOrderShippingInfo(OrderType order, Map parameters)

    This looks like it should be the point to extended ship info in the single shipment order, but the method is private which blocks being able to extend teh shipinfo type in the single shipment per order scenario.