At Digital Pacific where I work, I have been working on migrating from our current billing system to a new; more feature complete billing system that will provide many benefits to our clients. With our new billing system, Parallels Business Automation, users will be able to see all their invoices (past, present and future) and will be able to literally click one button and switch between all of their hosting control panels.
This move, however, has not been without quite a number of funny mishaps while moving from our current billing system (ModernBill) to Parallels Business Automation (”PBA”). The following text is going to go into quite a bit of technical information, so if you don’t know what XML is, well, you might just want
to close this window go to Wikipedia’s article on XML and look it up!
So what I have done, is I have made a set of files with 100 customers each. Every separate file gets imported by running the command on the PBA server ‘hspc-import.pl’. Here, I am running the 59th file (the files start at 00). hspc-import.pl is complaining that the email for person “Becky A. Douglas” is not defined, however, when I go to edit the file, the email is infact correct, and it is definitely defined. Just like it is for the clients before her.
This issue has had me baffled for weeks trying to solve this issue. Sometimes it works, sometimes it does not. Sometimes changing the name in the XML file will just magically solve the issue, as if it was not there to begin with.
So what I do, is I get on Skype and call our Sales Engineer at Parallels, and tell him what the issue is. He points out a few issues with the XML file (which is fair enough, but why did all the clients before these “just” import without any issues?).
I take into account the issues that he pointed out, and go and create a new set of import documents to get our clients into our new billing system. I run all the commands again to start the process rolling, and now the issue is coming up again!
But now something very, very bad is going on! The import is actually failing faster then it was before the fixes that were suggested by our Sales Engineer. So I back track and change a few lines in the XML file. Instead of the top of the file saying this:
<?xml version="1.0" encoding="UTF-8"?> <data> <account> <type>CUSTOMER</type> <status>active</status> <is_corporate>0</is_corporate> <name>Bob Smith</name>
It now says this:
<?xml version="1.0" encoding="UTF-8"?> <data>
<account> <type>CUSTOMER</type> <status>active</status> <is_corporate>0</is_corporate> <name>Bob Smith</name>
After adding exactly 15 new lines after the <data> child in the failing XML file in the import batch, you wouldn’t believe it. The import actually succeeded.
So now my new motto is, “Every bug in the world can be solved with just fifteen newlines!“.