Article 2N2B9 CodeSOD: Robotic Implementation

CodeSOD: Robotic Implementation

by
Remy Porter
from The Daily WTF on (#2N2B9)

Pearl's employer couldn't find an off-the-shelf product that handled their call-center needs, so they developed one in house. One department didn't want to use that front-end, so they developed a different one in house, but it still used the same backend" mostly. Another group did the same thing, adding some fields and extending the database. And then another.

Then there was an organizational restructuring, and suddenly the call-center reps found themselves in the annoying position of needing to do double- or sometimes triple-entry, in order to get all the right columns and fields filled out based on the current business rules.

Now this is a textbook example of where one might want to engage in some business process improvement: identify the actual needs of the organization, and implement software suited to those needs (chucking out any legacy kruft that you don't need). Doing this, of course, takes some work, it takes some analysis, and it takes an organization willing and ready to make changes.

Pearl's organization was not ready and willing to make changes. Instead, one of the PHBs had recently read an article on "robotic process automation", which is a fancy way of saying, "we're gonna screen-scrape using a fancy drag-n-drop workflow tool." Instead of spending time and money training the in-house developers to use the tool, the company could outsource it to a much cheaper team that already had experience.

Now, one-size-fits-all drag-n-drop scripting usually fails on the difficult edge cases, and Pearl's company had lots of difficult edge cases. No problem, the offshore team could just write some C# scripts to do the job, and call them from the workflow tool.

This is the script CheckFallingDate.cs which does" something.

DateTime PaymentDate = Convert.ToDateTime("10/05/2016");string strPaymentDate = PaymentDate.ToShortDateString();DateTime P = Convert.ToDateTime(strPaymentDate).Date;string strCurrent = DateTime.Now.ToString();string[] ds = strCurrent.Split(' ');DateTime CurrentDate = Convert.ToDateTime(ds[0]);string strCurrentDate = CurrentDate.ToShortDateString();DateTime C = Convert.ToDateTime(strCurrentDate).Date;string res = (P - C).ToString();string[] Value = res.Split('.');int x = Convert.ToInt32(Value[0]);Console.WriteLine(x);if (x > 10) return true;else return false;
otter-icon.png [Advertisement] Otter enables DevOps best practices by providing a visual, dynamic, and intuitive UI that shows, at-a-glance, the configuration state of all your servers. Find out more and download today! TheDailyWtf?d=yIl2AUoC8zAunEcx3W-J8M
External Content
Source RSS or Atom Feed
Feed Location http://syndication.thedailywtf.com/TheDailyWtf
Feed Title The Daily WTF
Feed Link http://thedailywtf.com/
Reply 0 comments