Wednesday, May 18, 2016

DeploymetServerMonitor (ATG Oracle commerce)

There is a chance that some of your deployment projects in BCC are huge and takes several minutes, even hours to deploy, so a tool that delivers the status of such project's deployment comes in handy, I have created a deploymentServerMonitor component that will email you the status of the current state of both of your configured Sites, in my case I have both, production and Staging.

This is how those notification looks like on outlook and Android email clients.




Here is the code, It can be changed to use your own emailTools to generate the email, the message can be created as you are used to, and it can be changed to display more information if needed, and the chart is coming from chart.googleapis.com, that can be changed to use what you like better.



Tuesday, May 17, 2016

Find broken sequence on DCS_PRD_CHLDSKU (ATG Oracle Commerce)

With this PL/SQL you can find which records on your DCS_PRD_CHLDSKU table are missing a sequence, is is an edge case, but when it happens you need to go and find them and fix them otherwise your deployment will be stuck, this will help you to do it for all your products.

The output will be tell you which products are missing the sequence, and it will be easy for you go and fix that miss.

This is and edge case that happens when one  of the schemas is modified out of the BCC, in an ideal world that should never happen, however we are not there and this kind of things happen.

When this happens you will find something similar to these messages on the logs:

The referenced item 'sku_id in the childSKUs property of the item 'productId' cannot be found 

on target, which implies a data inconsistency between source and target.  It will not be included

in the deployed list.
Error reading list or array index from the database. Expected: 'sequence number', got 

'other sequence number'. The following property was not read: "{The name of a property}",

for item id: 'product_id'. This means the database table holding this property does not
 
have sequential integers starting with 0 in its multi-column.

This should only happen if the database table was modified directly (outside of Dynamo).

This can be done also with a Query, but is a very heavy query, this as heavy as your catalog size, Special Thanks to Roberto Ibarra who build this query