Converting Process to a Service

Posted by Admin on 14-May-2008 00:06

Hello,

From what I have noticed during the course of researching on ESB, I have found Service to be different from a Process in the sense that a Process has a definite start and end points whilst a service is ever continuing, providing service to whatever requests its got from the subscribers. And a process can contain one or more Services in it.

Please let me know if my observation is correct.

I would further like to know whether its possible to convert a process to a service.

Thanks,

Maxy

All Replies

Posted by fbe on 14-May-2008 03:57

I will try to demystify this somewhat:

An ESB Process is basically an itinerary (a list of steps to follow). An ESB process (the list of individual steps) can contain ESB Services, nested processes or endpoints. An ESB Service is basically a piece of software that provides scoped functionality (what it is created to perform) and conforms to a defined interface.

So a process has like you say a start and end (the flow) and contains a series of steps (which can be ESB Services) whereas an ESB Service is activated based on events.

You can create ESB Processes graphically using the Sonic Integrated Workbench (using New->ESB Process).

You can create custom ESB Services (like the Sample.FilePollingService) using the Sonic Integrated Workbench and some java coding (using New->Java Service Type).

Process Steps within an ESB Process (which can contain ESB Services) can be refactored into separate ESB Processes.

The Sonic Integrated Workbench does not provide support for refactoring an ESB Process into an ESB Service. Also, you have to question if this is what you would like to do (you could custom code it) because you would be creating a 'large' piece of functionality which has fixed behaviour whereas an ESB Process is more flexible and can be easily changed.

So keep services functionality scope low (do simple things fast) and for bigger functionality scopes, use ESB Processes.

Posted by Admin on 15-May-2008 05:09

OK Frank, Thank you again.

It seems I am still confused over creating services or processes. Well I am inquisitive to know whether our ultimate goal in using ESB is to create a service or a process.

Other thing, I have a process or a service. How do I test them without the aid of IW?

Please clarify.

Posted by dmillman on 15-May-2008 06:39

You can think in many cases that a service and a process are interchangable, the only real difference being that a service is most atomic element on the ESB, and the process is a composition of other services and processes.

Typically I use processes first to define the various components that required in a solution as I can change the implementation of these a lot quicker using workbench's editor than I can a service written in Java.

A service should be designed to perform one task and be as configurable as possible, e.g. the Database Service can connect to any RDBMS that supports JDBC but can execute any valid SQL statement against the database. The individual configurations or statements are hidden in process configurations as runtime parameters. This way a single service can be reused multiple times.

You may want to look at http://www.psdn.com/library/entry.jspa?externalID=2148&categoryID=1220to get some more information.

Hope this helps

David

Posted by dmillman on 15-May-2008 06:41

Sorry missed your last question. Both ESB processes and Services can be deployed in an ESB container and then in an MF Container. Once the services/processes are deployed they can be invoked by any JMS application such as the test client.

For further insight you can enable process tracking and enable the process tracker

David

Posted by Admin on 16-May-2008 00:20

Thanks David for the wonderful doc by you,

The doc has really clarified my understandings on SOA.

Really I am getting difficulty on implementation rather. I have been successful in creating different services/processes using the Workbench have got quite a good understandings of how they work. Process tracker as suggested by you is really a excellent tool.

However I am unclear on how a deployed service or process can be invoked apart from invoking them from the workbench by creating different scenarios. Is the any doc regarding this?

Maxy

Message was edited by:

Mondi Ravi

Posted by fbe on 16-May-2008 02:28

Posted by Admin on 16-May-2008 04:42

Thanks Frank,

How to add a process to an ESB Container?

I have just known to deploy a service into an ESB Container (by creating an esbstyp file for the service). For an ESB Process I am used to uploading it only by clicking the upload button in the Workbench. I dont see any entry for the process listed in my container view. Thats the problem I guess.

I followed all the steps you suggested. I am able to publish message and receive them from within the JMS TestClient, but I am failing to link a process created within Workbench and the TestClient,

Maxy

Posted by fbe on 16-May-2008 06:45

Posted by Admin on 20-May-2008 06:40

Thank you Frank,

Really the steps you mentioned helped me to achieve the target I was trying to get for a long time.

However I had few hiccups before I could end up at the desired state. I would like to share this.

4) Switch to Container View

5) Select and right-click the ESB Container you wish to deploy the process in (dev_ESBTest for example) and select Properties.

mentioned in your answer, actually got me confused. I had tried this several times before (Sonic V7.5), and never got a 'properties' option to select. I am attaching an image of what is seen when I right clicked.

Then I thought of you perhaps suggesting SMC's Container View. I did exactly what you mentioned (with a bit of changes) and got to the point what you were trying to suggest.

Still then, when I tried to send the messages using JMS Client, I found no triggerring of the process.

I had in fact forgotten to restart the container.

And then when I had it finally restarted, I got the process triggerred whenever I sent a message to the subscribed topic.

All is well that ends Well.

Maxy

Posted by fbe on 21-May-2008 03:14

Very good! Yes, I forgot to mention that I was using Sonic Workbench 7.6 which is slightly different where it comes to using the tools... my bad!

Good to hear you are up and running with what you tried to accomplish!

This thread is closed