Converting Business Processes into Web Services – Fast and Easy

Software vendors love to talk about all the new exciting things found in their latest release of their software products.  We dive deep into all kinds of technical details, have acronyms for way more things than we need and obsess about really cool technical things that only a true nerd could love.

Sometimes, we forget that people don’t use technical things and features, they actually use the software to solve real problems.   These people, including our customers, have real jobs where they are behind on their projects, with more projects stacked up waiting.   They use our collection of cool snazzy features to accomplish work in the real world.

Not long ago, I received a technical support call from a customer.  At the end of the call he said something triggered this blog post: “Your product has let me enjoy my job again.  I can actually get work done.”

Our product specification sheet can say “Super Productive” or “Almost does the work by itself,” “Makes your life easier by orders of magnitude,” etc. But almost every software product these days makes similar claims.  It is just typical marketing hyperbole.  No one takes it seriously.

This person that called was sick of fighting with the tools and software.  His simple goal was just to get his work finished.  He wanted to knock out his project quickly to help out the person who needed it.

What was it that made this customer say what he did about HostBridge?  The feature isn’t listed on our product specification sheet.  It isn’t some cutting edge, trendy, “gee-whiz” item.  It doesn’t use acronyms or lot of jargon a non-technical person would glaze over hearing.

So what was it? Productivity, and since productivity is a bit nebulous, I’ll demonstrate via a few screen captures.

Let’s say someone needs a web service that outputs a JSON document.  It needs to be a mainframe-based web service running inside of CICS.  Why there?  Because that is where the application resides that has the needed data.

The first screenshot shows how I pull up Eclipse and create a simple JavaScript.  The primitive “write()” is what sends data to HostBridge.  The variable called “output” stores some JSON.  The “write()” primitive is then used to send the JSON as output, as shown here:

To send this script to HostBridge, to compile, store and create a web service, we right click and do a “Make” as this screenshot shows:

If there had been any errors, they would have been reported in the Console tab.  This script is syntactically correct, so a web service was made.

Now to test the service, I use a web browser (Chrome, as shown in this screenshot) to access the service via its URL:

It accessed the service, received the JSON as output and parsed/formatted in the manner Chrome does.

This is now a live service, created using these three steps:

  1. Pull up Eclipse, write some starting JavaScript.
  2. Right click and do a Make ( there is also a toolbar button for Make as an alternative to the right click context menu ).
  3. Pull up a web browser and test the web service.

This process allows rapid iterations of coding/testing/refining.

Will real customers use a web browser as a client?  No, but as a testing tool to make sure your web service is functioning, it is quite handy.

Will real customers use a script so simple with a fixed JSON output?  Nope, but you’ve got to start somewhere.  Once you have a starting point and you know the service works and outputs valid JSON, you iterate using code/test/fix cycles.  Real world services have input and output, get and put data into applications, COMMAREA programs, DB2, VSAM and have often more error handling code than actual logic code due to the importance of these applications.

Notice in the starting script where it says ‘Magic occurs here…‘?

This is where the person writing the script does something that we can’t do with tools or technology.  They understand their mainframe application, and they use this knowledge to convert a business process into a web service.

This is the really hard part, hence the reason I call it “magic.”  JavaScript is JavaScript, Eclipse is Eclipse, but your mainframe applications, data and how they are specifically used are uniquely your own.

This is where the real value of HostBridge comes from.  We give you the tooling to convert a process that a human used to do manually into a web service consumable by another machine.  We try to make it as easy as possible and stay out of your way, so you can get your real work finished and if we are lucky, you might just enjoy creating CICS web services!

Happy coding!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s